idx
int64
0
241k
question
stringlengths
64
6.21k
target
stringlengths
5
803
17,800
public function addRole ( CNabuSiteMapRole $ nb_role ) { if ( $ nb_role -> isValueNumeric ( NABU_ROLE_FIELD_ID ) || $ nb_role -> isValueGUID ( NABU_ROLE_FIELD_ID ) ) { $ nb_role -> setSiteMap ( $ this ) ; $ this -> nb_site_map_role_list -> addItem ( $ nb_role ) ; } return $ nb_role ; }
Add a Role to this Site Map node .
17,801
public function equals ( Definition $ definition ) : bool { if ( get_class ( $ this ) !== get_class ( $ definition ) ) { return false ; } if ( null !== $ this -> type xor null !== $ definition -> type ) { return false ; } if ( null !== $ this -> type && null !== $ definition -> type && ! $ this -> type -> equals ( $ de...
Checks if another definition is equal .
17,802
protected function replaceResource ( $ modelName ) { $ this -> stub = str_replace ( '{{resource_lw}}' , strtolower ( $ modelName ) , $ this -> stub ) ; $ this -> stub = str_replace ( '{{resource}}' , $ modelName , $ this -> stub ) ; return $ this ; }
Replace the resource .
17,803
public function getTemplateWebPath ( $ file = '' , $ version = true ) { $ webPath = '/assets/' ; if ( ! empty ( $ file ) && $ version ) { $ webPath .= $ file . '?' . $ this -> get_static_version ( ) ; } else { $ webPath .= $ file ; } return $ webPath ; }
give the path of resources with the current static version
17,804
public function get ( $ key ) { return ( isset ( $ this -> tpl [ 'vars' ] [ $ key ] ) ) ? $ this -> tpl [ 'vars' ] [ $ key ] : null ; }
get the value of a variable assigned to the view
17,805
public function yields ( $ yield = self :: DEFAULT_YIELD ) { if ( ! empty ( $ this -> content_for [ $ yield ] ) ) echo $ this -> content_for [ $ yield ] ; if ( ! empty ( $ this -> tpl [ 'layout' ] [ 'yields' ] [ $ yield ] ) && file_exists ( $ this -> getTemplatePath ( $ this -> tpl [ 'layout' ] [ 'yields' ] [ $ yield ]...
include a tpl file exactly where the yields method is called
17,806
public function isYieldable ( $ yield = self :: DEFAULT_YIELD ) { return ( ! empty ( $ this -> tpl [ 'layout' ] [ 'yields' ] [ $ yield ] ) && file_exists ( $ this -> getTemplatePath ( $ this -> tpl [ 'layout' ] [ 'yields' ] [ $ yield ] ) ) ) ; }
Test existence of a yield section
17,807
public function compute ( ) { if ( file_exists ( $ this -> getTemplatePath ( $ this -> tpl [ 'layout' ] [ 'path' ] ) ) ) { include $ this -> getTemplatePath ( $ this -> tpl [ 'layout' ] [ 'path' ] ) ; } else echo "Layout does not exists " . $ this -> tpl [ 'layout' ] [ 'path' ] ; }
render the whole layout and display it
17,808
public static function getFilteredClusterGroupServiceList ( $ q = null , $ fields = null , $ order = null , $ offset = 0 , $ num_items = 0 ) { $ fields_part = nb_prefixFieldList ( CNabuClusterGroupServiceBase :: getStorageName ( ) , $ fields , false , true , '`' ) ; $ order_part = nb_prefixFieldList ( CNabuClusterGroup...
Gets a filtered list of Cluster Group Service instances represented as an array . Params allows the capability of select a subset of fields order by concrete fields or truncate the list by a number of rows starting in an offset .
17,809
public function setUseSSL ( string $ use_ssl = "F" ) : CNabuDataObject { if ( $ use_ssl === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_ssl" ) ) ; } $ this -> setValue ( 'nb_cluster_group_service_use_ssl' , $ use_ssl ) ; return $ this ; }
Sets the Cluster Group Service Use SSL attribute value .
17,810
protected function registerServiceInterface ( INabuMessagingServiceInterface $ interface ) : bool { $ hash = $ interface -> getHash ( ) ; if ( is_array ( $ this -> service_interface_list ) && array_key_exists ( $ hash , $ this -> service_interface_list ) ) { throw new ENabuMessagingException ( ENabuMessagingException :...
Register a new Messaging Interface instance .
17,811
public function createServiceInterface ( string $ class_name ) : INabuMessagingServiceInterface { $ nb_engine = CNabuEngine :: getEngine ( ) ; $ nb_descriptor = $ nb_engine -> getProviderInterfaceDescriptor ( $ this -> getVendorKey ( ) , $ this -> getModuleKey ( ) , CNabuProviderFactory :: INTERFACE_MESSAGING_SERVICE ,...
Create a Service Interface to manage a Messaging service . This method is intended to speed up the creation of Service Interfaces in descendant Messaging modules .
17,812
protected function registerTemplateRenderInterface ( INabuMessagingTemplateRenderInterface $ interface ) : bool { $ hash = $ interface -> getHash ( ) ; if ( is_array ( $ this -> template_render_interface_list ) && array_key_exists ( $ hash , $ this -> template_render_interface_list ) ) { throw new ENabuMessagingExcepti...
Register a new Messaging Template Render Interface instance .
17,813
public function createTemplateRenderInterface ( string $ class_name ) : INabuMessagingTemplateRenderInterface { $ nb_engine = CNabuEngine :: getEngine ( ) ; $ nb_descriptor = $ nb_engine -> getProviderInterfaceDescriptor ( $ this -> getVendorKey ( ) , $ this -> getModuleKey ( ) , CNabuProviderFactory :: INTERFACE_MESSA...
Create a Template Render Interface to manage a Messaging Template Render . This method is intended to speed up the creation of Template Render Interfaces in descendant Messaging Modules .
17,814
public function getHTTPServerFactory ( CNabuHTTPServerInterfaceDescriptor $ nb_descriptor ) { if ( ! ( $ retval = $ this -> nb_http_server_factory_list -> getItem ( $ nb_descriptor -> getKey ( ) ) ) ) { $ retval = $ this -> nb_http_server_factory_list -> addItem ( new CNabuHTTPServerFactory ( $ nb_descriptor ) ) ; } re...
Gets a HTTP Server Factory instance for a Descriptor . If Factory instance already exists then returns it .
17,815
public static function hydrateCollection ( array $ sanitizers ) { $ hydrated = [ ] ; foreach ( $ sanitizers as $ sanitizer ) { $ hydrated [ ] = self :: hydrate ( $ sanitizer ) ; } return $ hydrated ; }
Hydrate a collection of sanitizer objects into a collection of SanitizerEntity objects
17,816
public static function hydrate ( stdClass $ sanitizer ) { $ hydrated = new SanitizerEntity ( ) ; if ( isset ( $ sanitizer -> id ) ) { $ hydrated -> setId ( $ sanitizer -> id ) ; } if ( isset ( $ sanitizer -> class ) ) { $ hydrated -> setClass ( $ sanitizer -> class ) ; } if ( isset ( $ sanitizer -> method ) ) { $ hydra...
Hydrate a sanitizer object into a SanitizerEntity object
17,817
public function getAll ( $ appId , $ profileId , array $ queryParams ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> sinks ( ) -> getAll ( $ appId , $ profileId , $ queryParams ) ; return new SinksResponse ( $ response ) ; }
Get all sinks for a profile profile
17,818
public function getById ( $ appId , $ profileId , $ sinkId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> sinks ( ) -> getById ( $ appId , $ profileId , $ sinkId , $ queryParams ) ; return new SinkResponse ( $ response ) ; }
Get sink for profile profile by id
17,819
public function create ( $ appId , $ profileId , SinkBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> sinks ( ) -> create ( $ appId , $ profileId , $ input -> toArray ( ) , $ queryParams ) ; return new SinkResponse ( $ response ) ; }
Create sink for profile profile
17,820
public static function getAllCommerces ( CNabuCustomer $ nb_customer ) { $ nb_customer_id = nb_getMixedValue ( $ nb_customer , 'nb_customer_id' ) ; if ( is_numeric ( $ nb_customer_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_commerce_id' , 'select * ' . 'from...
Get all items in the storage as an associative array where the field nb_commerce_id is the index and each value is an instance of class CNabuCommerceBase .
17,821
protected function setAttributes ( SimpleXMLElement $ element ) { $ element -> addAttribute ( 'GUID' , $ this -> nb_data_object -> grantHash ( true ) ) ; $ this -> putAttributesFromList ( $ element , array ( 'nb_site_target_key' => 'key' , 'nb_site_target_order' => 'order' , 'nb_site_target_begin_date' => 'beginDate' ,...
Set default attributes of Site Target in XML Element .
17,822
protected function getChilds ( SimpleXMLElement $ element ) { parent :: getChilds ( $ element ) ; $ this -> getChildsAsCDATAFromList ( $ element , array ( 'nb_site_target_attributes' => 'attributes' ) , false ) ; }
Get default childs of Site Target from XML Element as Element > CDATA structure .
17,823
protected function setChilds ( SimpleXMLElement $ element ) { parent :: setChilds ( $ element ) ; $ this -> putChildsAsCDATAFromList ( $ element , array ( 'nb_site_target_attributes' => 'attributes' ) , false ) ; }
Set default childs of Site Target XML Element as Element > CDATA structure .
17,824
public static function hydrateCollection ( array $ issues ) { $ hydrated = [ ] ; foreach ( $ issues as $ issue ) { $ hydrated [ ] = self :: hydrate ( $ issue ) ; } return $ hydrated ; }
Hydrate a collection of issue objects into a collection of IssueEntity objects
17,825
public function setAllowedGrantTypes ( $ allowedGrantTypes ) { foreach ( $ allowedGrantTypes as $ allowedGrantType ) { if ( ! in_array ( $ allowedGrantType , $ this -> availableGrantTypes ) ) { throw new \ Exception ( 'Unknown grant type ' . $ allowedGrantType ) ; } } $ this -> allowedGrantTypes = $ allowedGrantTypes ;...
Set allowed grant types
17,826
protected function acquireItem ( $ key , $ index = false ) { $ retval = false ; $ nb_engine = CNabuEngine :: getEngine ( ) ; if ( $ nb_engine -> isMainDBAvailable ( ) ) { $ item = new CNabuModuleMorph ( $ key ) ; if ( $ item -> isFetched ( ) ) { $ retval = $ item ; } } return $ retval ; }
Acquires an instance of class CNabuModuleMorph from the database .
17,827
public function compile ( $ stub , $ modelName , $ modelData , stdClass $ scaffolderConfig , $ hash , ScaffolderThemeExtensionInterface $ themeExtension , array $ extensions , $ extra = null ) { $ this -> stub = $ stub ; $ this -> stub = $ themeExtension -> runAfterLoginViewIsCompiled ( $ this -> stub , $ scaffolderCon...
Compiles the login view .
17,828
protected function parseIncomingRequest ( $ request ) { if ( ! $ request ) { $ request = LumenRequest :: capture ( ) ; } $ this -> instance ( Request :: class , $ this -> prepareRequest ( $ request ) ) ; return [ $ request -> getMethod ( ) , '/' . \ trim ( $ request -> getPathInfo ( ) , '/' ) ] ; }
Parse the incoming request and return the method and path info .
17,829
protected function callActionOnArrayBasedRoute ( $ routeInfo ) { $ action = $ routeInfo [ 1 ] ; if ( isset ( $ action [ 'uses' ] ) ) { return $ this -> prepareResponse ( $ this -> callControllerAction ( $ routeInfo ) ) ; } foreach ( $ action as $ value ) { if ( $ value instanceof Closure ) { $ closure = $ value -> bind...
Call the Closure on the array based route .
17,830
public function prepareResponse ( $ response ) { $ request = \ app ( Request :: class ) ; if ( $ response instanceof Responsable ) { $ response = $ response -> toResponse ( $ request ) ; } if ( $ response instanceof PsrResponseInterface ) { $ response = ( new HttpFoundationFactory ( ) ) -> createResponse ( $ response )...
Prepare the response for sending .
17,831
public function scan ( $ classes , $ namespaceTablenames = true , $ morphClassAbbreviations = true ) { $ this -> namespaceTablenames = $ namespaceTablenames ; $ this -> morphClassAbbreviations = $ morphClassAbbreviations ; $ metadata = [ ] ; foreach ( $ classes as $ class ) { $ entityMetadata = $ this -> parseClass ( $...
Build metadata from all entity classes .
17,832
public function parseClass ( $ class ) { $ reflectionClass = new ReflectionClass ( $ class ) ; if ( $ this -> reader -> getClassAnnotation ( $ reflectionClass , '\ProAI\Datamapper\Annotations\Entity' ) ) { return $ this -> parseEntity ( $ class ) ; } else { return null ; } }
Parse a class .
17,833
protected function parseEmbeddedClass ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata , $ primaryKeyOnly = false ) { $ annotation -> class = $ this -> getRealEntity ( $ annotation -> class , $ entityMetadata [ 'class' ] ) ; $ reflectionClass = new ReflectionClass ( $ annotation -> class ) ; $ c...
Parse an embedded class .
17,834
protected function setAdditionalColumnProperties ( $ name , Annotation & $ annotation , array $ propertyAnnotations , $ embedded = false , $ columnPrefix = false ) { foreach ( $ propertyAnnotations as $ subAnnotation ) { if ( $ subAnnotation instanceof \ ProAI \ Datamapper \ Annotations \ Id ) { $ annotation -> primary...
Set properties of column annotation related annotations .
17,835
protected function parseColumn ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata , $ embedded = false , $ primaryKeyOnly = false ) { if ( $ annotation -> primary == $ primaryKeyOnly ) { if ( ! empty ( $ entityMetadata [ 'versionTable' ] ) && $ annotation -> versioned ) { $ entityMetadata [ 'versi...
Parse a column .
17,836
protected function generateColumn ( $ name , $ annotation ) { $ this -> validator -> validateColumnType ( $ annotation -> type ) ; return new ColumnDefinition ( [ 'name' => $ annotation -> name , 'type' => $ annotation -> type , 'nullable' => $ annotation -> nullable , 'default' => $ annotation -> default , 'primary' =...
Generate a column .
17,837
protected function generateVersionTable ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ annotation = clone $ annotation ; $ annotation -> name = 'ref_' . $ annotation -> name ; $ annotation -> autoIncrement = false ; $ entityMetadata [ 'versionTable' ] [ 'columns' ] [ ] = $ this -> genera...
Generate versioning table .
17,838
protected function generateAttributeOptionsArray ( Annotation $ annotation ) { $ options = [ ] ; if ( $ annotation -> type == 'string' || $ annotation -> type == 'char' || $ annotation -> type == 'binary' ) { $ options [ 'length' ] = $ annotation -> length ; } if ( $ annotation -> type == 'binary' && $ annotation -> le...
Generate an options array for an attribute .
17,839
protected function parseRelation ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ this -> validator -> validateRelationType ( $ annotation -> type ) ; $ annotation -> relatedEntity = $ annotation -> relatedEntity ? $ this -> getRealEntity ( $ annotation -> relatedEntity , $ entityMetadata ...
Parse a relationship .
17,840
protected function generateBelongsToColumns ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ relatedForeignKey = $ annotation -> relatedForeignKey ? : $ this -> generateKey ( $ annotation -> relatedEntity ) ; $ entityMetadata [ 'table' ] [ 'columns' ] [ ] = $ this -> getModifiedPrimaryKeyC...
Generate extra columns for a belongsTo relation .
17,841
protected function generateMorphToColumns ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ morphName = ( ! empty ( $ annotation -> morphName ) ) ? $ annotation -> morphName : $ name ; $ morphId = ( ! empty ( $ annotation -> morphId ) ) ? $ annotation -> morphId : $ morphName . '_id' ; $ mo...
Generate extra columns for a morphTo relation .
17,842
protected function generateBelongsToManyPivotTable ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ tableName = ( $ annotation -> pivotTable ) ? $ annotation -> pivotTable : $ this -> generatePivotTablename ( $ entityMetadata [ 'class' ] , $ annotation -> relatedEntity , $ annotation -> in...
Generate pivot table for a belongsToMany relation .
17,843
protected function generateMorphToManyPivotTable ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata ) { $ morphName = $ annotation -> morphName ; $ tableName = ( $ annotation -> pivotTable ) ? $ annotation -> pivotTable : $ this -> generatePivotTablename ( $ entityMetadata [ 'class' ] , $ annotati...
Generate pivot table for a morphToMany relation .
17,844
protected function getModifiedPrimaryKeyColumn ( TableDefinition $ tableMetadata , array $ data ) { foreach ( $ tableMetadata [ 'columns' ] as $ columnMetadata ) { if ( $ columnMetadata [ 'primary' ] ) { $ modifiedColumnMetadata = clone $ columnMetadata ; foreach ( $ data as $ key => $ value ) { if ( $ key == 'options'...
Get primary key column .
17,845
protected function generateMorphableClasses ( array & $ metadata ) { foreach ( $ metadata as $ key => $ entityMetadata ) { foreach ( $ entityMetadata [ 'relations' ] as $ relationKey => $ relationMetadata ) { if ( $ relationMetadata [ 'type' ] == 'morphTo' ) { $ metadata [ $ key ] [ 'relations' ] [ $ relationKey ] [ 'o...
Generate array of morphable classes for a morphTo or morphToMany relation .
17,846
protected function getMorphableClasses ( $ relatedEntity , $ morphName , array $ metadata , $ many = false ) { $ morphableClasses = [ ] ; foreach ( $ metadata as $ entityMetadata ) { foreach ( $ entityMetadata [ 'relations' ] as $ relationMetadata ) { if ( ! ( ( ! $ many && $ relationMetadata [ 'type' ] == 'morphOne' )...
Get array of morphable classes for a morphTo or morphToMany relation .
17,847
protected function generatePivotTablename ( $ class1 , $ class2 , $ inverse , $ morph = null ) { if ( $ this -> namespaceTablenames ) { $ base = ( $ inverse ) ? $ this -> generateTableName ( $ class1 , true ) : $ this -> generateTableName ( $ class2 , true ) ; $ related = ( ! empty ( $ morph ) ) ? $ morph : ( ! empty (...
Generate the database tablename of a pivot table .
17,848
protected function generateTableName ( $ class ) { if ( $ this -> namespaceTablenames ) { $ className = array_slice ( explode ( '/' , str_replace ( '\\' , '/' , $ class ) ) , 2 ) ; if ( count ( $ className ) >= 2 && end ( $ className ) == prev ( $ className ) ) { array_pop ( $ className ) ; } $ classBasename = array_po...
Generate the table associated with the model .
17,849
protected function getColumnName ( $ name , $ prefix = false ) { $ name = snake_case ( $ name ) ; if ( $ prefix ) { $ name = $ prefix . '_' . $ name ; } return $ name ; }
Get column name of a name .
17,850
public static function hydrateCollection ( array $ censuses ) { $ hydrated = [ ] ; foreach ( $ censuses as $ census ) { $ hydrated [ ] = self :: hydrate ( $ census ) ; } return $ hydrated ; }
Hydrate a collection of census objects into a collection of CensusEntity objects
17,851
public static function hydrate ( stdClass $ census ) { $ hydrated = new CensusEntity ( ) ; if ( isset ( $ census -> id ) ) { $ hydrated -> setId ( $ census -> id ) ; } if ( isset ( $ census -> scans ) ) { $ hydrated -> setScans ( $ census -> scans ) ; } if ( isset ( $ census -> issues ) ) { $ hydrated -> setIssues ( $ ...
Hydrate a census object into a CensusEntity object
17,852
public static function getAllSites ( CNabuCustomer $ nb_customer ) { $ nb_customer_id = nb_getMixedValue ( $ nb_customer , 'nb_customer_id' ) ; if ( is_numeric ( $ nb_customer_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_site_id' , 'select * ' . 'from nb_site...
Get all items in the storage as an associative array where the field nb_site_id is the index and each value is an instance of class CNabuSiteBase .
17,853
public function setMountingOrder ( int $ mounting_order = 0 ) : CNabuDataObject { if ( $ mounting_order === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$mounting_order" ) ) ; } $ this -> setValue ( 'nb_site_mounting_order' , $ mounting_order ) ; return $ thi...
Sets the Site Mounting Order attribute value .
17,854
public function setPublished ( string $ published = "F" ) : CNabuDataObject { if ( $ published === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$published" ) ) ; } $ this -> setValue ( 'nb_site_published' , $ published ) ; return $ this ; }
Sets the Site Published attribute value .
17,855
public function setPublicBasePathEnabled ( string $ public_base_path_enabled = "F" ) : CNabuDataObject { if ( $ public_base_path_enabled === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$public_base_path_enabled" ) ) ; } $ this -> setValue ( 'nb_site_public_b...
Sets the Site Public Base Path Enabled attribute value .
17,856
public function setDefaultTargetUseURI ( string $ default_target_use_uri = "N" ) : CNabuDataObject { if ( $ default_target_use_uri === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$default_target_use_uri" ) ) ; } $ this -> setValue ( 'nb_site_default_target_u...
Sets the Site Default Target Use URI attribute value .
17,857
public function setDefaultErrorCode ( int $ default_error_code = 301 ) : CNabuDataObject { if ( $ default_error_code === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$default_error_code" ) ) ; } $ this -> setValue ( 'nb_site_default_error_code' , $ default_er...
Sets the Site Default Error Code attribute value .
17,858
public function setPageNotFoundTargetUseURI ( string $ page_not_found_target_use_uri = "N" ) : CNabuDataObject { if ( $ page_not_found_target_use_uri === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$page_not_found_target_use_uri" ) ) ; } $ this -> setValue (...
Sets the Site Page Not Found Target Use URI attribute value .
17,859
public function setPageNotFoundErrorCode ( int $ page_not_found_error_code = 404 ) : CNabuDataObject { if ( $ page_not_found_error_code === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$page_not_found_error_code" ) ) ; } $ this -> setValue ( 'nb_site_page_not...
Sets the Site Page Not Found Error Code attribute value .
17,860
public function setLoginMaxFailsTargetUseURI ( string $ login_max_fails_target_use_uri = "N" ) : CNabuDataObject { if ( $ login_max_fails_target_use_uri === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$login_max_fails_target_use_uri" ) ) ; } $ this -> setVal...
Sets the Site Login Max Fails Target Use URI attribute value .
17,861
public function setAliasNotFoundTargetUseURI ( string $ alias_not_found_target_use_uri = "N" ) : CNabuDataObject { if ( $ alias_not_found_target_use_uri === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$alias_not_found_target_use_uri" ) ) ; } $ this -> setVal...
Sets the Site Alias Not Found Target Use URI attribute value .
17,862
public function setAliasLockedTargetUseURI ( string $ alias_locked_target_use_uri = "N" ) : CNabuDataObject { if ( $ alias_locked_target_use_uri === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$alias_locked_target_use_uri" ) ) ; } $ this -> setValue ( 'nb_si...
Sets the Site Alias Locked Target Use URI attribute value .
17,863
public function setRequirePoliciesAfterLogin ( string $ require_policies_after_login = "F" ) : CNabuDataObject { if ( $ require_policies_after_login === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$require_policies_after_login" ) ) ; } $ this -> setValue ( '...
Sets the Site Require Policies After Login attribute value .
17,864
public function setUseCache ( string $ use_cache = "F" ) : CNabuDataObject { if ( $ use_cache === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_cache" ) ) ; } $ this -> setValue ( 'nb_site_use_cache' , $ use_cache ) ; return $ this ; }
Sets the Site Use Cache attribute value .
17,865
public function setHTTPSupport ( string $ http_support = "F" ) : CNabuDataObject { if ( $ http_support === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$http_support" ) ) ; } $ this -> setValue ( 'nb_site_http_support' , $ http_support ) ; return $ this ; }
Sets the Site HTTP Support attribute value .
17,866
public function setHTTPSSupport ( string $ https_support = "F" ) : CNabuDataObject { if ( $ https_support === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$https_support" ) ) ; } $ this -> setValue ( 'nb_site_https_support' , $ https_support ) ; return $ this...
Sets the Site HTTPS Support attribute value .
17,867
public function setUseAWStats ( string $ use_awstats = "F" ) : CNabuDataObject { if ( $ use_awstats === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_awstats" ) ) ; } $ this -> setValue ( 'nb_site_use_awstats' , $ use_awstats ) ; return $ this ; }
Sets the Site Use AWStats attribute value .
17,868
public function setWSearchEnabled ( string $ wsearch_enabled = "F" ) : CNabuDataObject { if ( $ wsearch_enabled === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$wsearch_enabled" ) ) ; } $ this -> setValue ( 'nb_site_wsearch_enabled' , $ wsearch_enabled ) ; r...
Sets the Site WSearch Enabled attribute value .
17,869
public function setUseFramework ( string $ use_framework = "F" ) : CNabuDataObject { if ( $ use_framework === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_framework" ) ) ; } $ this -> setValue ( 'nb_site_use_framework' , $ use_framework ) ; return $ this...
Sets the Site Use Framework attribute value .
17,870
public function setEnableVirtualHostFile ( string $ enable_vhost_file = "F" ) : CNabuDataObject { if ( $ enable_vhost_file === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$enable_vhost_file" ) ) ; } $ this -> setValue ( 'nb_site_enable_vhost_file' , $ enable...
Sets the Site Enable VirtualHost File attribute value .
17,871
public function setEnableSessionStrictPolicies ( string $ enable_session_strict_policies = "F" ) : CNabuDataObject { if ( $ enable_session_strict_policies === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$enable_session_strict_policies" ) ) ; } $ this -> setV...
Sets the Site Enable Session Strict Policies attribute value .
17,872
public function setStaticContentUseAlternative ( string $ static_content_use_alternative = "D" ) : CNabuDataObject { if ( $ static_content_use_alternative === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$static_content_use_alternative" ) ) ; } $ this -> setV...
Sets the Site Static Content Use Alternative attribute value .
17,873
public function setForceCookieAsSecure ( string $ force_cookie_as_secure = "F" ) : CNabuDataObject { if ( $ force_cookie_as_secure === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$force_cookie_as_secure" ) ) ; } $ this -> setValue ( 'nb_site_force_cookie_as_...
Sets the Site Force Cookie As Secure attribute value .
17,874
public function setMaxSignInRetries ( int $ max_signin_retries = 0 ) : CNabuDataObject { if ( $ max_signin_retries === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$max_signin_retries" ) ) ; } $ this -> setValue ( 'nb_site_max_signin_retries' , $ max_signin_r...
Sets the Site Max SignIn Retries attribute value .
17,875
public function setSignInLockDelay ( int $ signin_lock_delay = 0 ) : CNabuDataObject { if ( $ signin_lock_delay === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$signin_lock_delay" ) ) ; } $ this -> setValue ( 'nb_site_signin_lock_delay' , $ signin_lock_delay...
Sets the Site SignIn Lock Delay attribute value .
17,876
public static function hydrate ( stdClass $ status ) { $ hydrated = new StatusEntity ( ) ; if ( isset ( $ status -> version ) ) { $ hydrated -> setVersion ( $ status -> version ) ; } if ( isset ( $ status -> cloud ) ) { $ hydrated -> setCloud ( $ status -> cloud ) ; } if ( isset ( $ status -> maintenance ) ) { $ hydrat...
Hydrate a status object into a StatusEntity
17,877
protected function locateDataObject ( SimpleXMLElement $ element , CNabuDataObject $ data_parent = null ) : bool { $ retval = false ; if ( isset ( $ element [ 'GUID' ] ) ) { $ guid = ( string ) $ element [ 'GUID' ] ; if ( ! ( $ this -> nb_data_object instanceof CNabuSiteTargetLanguageList ) ) { $ this -> nb_data_object...
Locate a Data Object .
17,878
public static function getOS ( ) { if ( self :: $ nb_os === null ) { self :: $ nb_os = new CNabuOS ( ) ; self :: $ nb_os -> init ( ) ; } return self :: $ nb_os ; }
Get the singleton instance of CNabuOS .
17,879
private function init ( ) { $ this -> os_name = php_uname ( 's' ) ; $ this -> os_version = php_uname ( 'r' ) ; $ this -> os_architecture = php_uname ( 'm' ) ; $ this -> php_version = preg_split ( '/\\./' , phpversion ( ) ) ; }
Initiates the singleton instance and gater the OS information .
17,880
public function getDefaultCountry ( $ store = null ) { if ( $ store === null && $ this -> country === null ) { $ country = $ this -> geoService -> getCountry ( ) ; $ this -> country = $ country !== null ? $ country : false ; } return $ this -> country ? $ this -> country : parent :: getDefaultCountry ( $ store ) ; }
We prefer not to use a preference for this but we re not allowed to create a plugin for Magento \ Directory \ Helper \ Data because it s a virtual type .
17,881
public function sync ( ) { $ this -> data = $ this -> parent -> driver -> getData ( $ this -> name ) ; return $ this ; }
Sync the data
17,882
function autoincrement ( ) { if ( ! isset ( $ this -> data [ '_NonDB_System_' ] [ '_AutoIncrement_' ] ) ) { $ this -> data [ '_NonDB_System_' ] [ '_AutoIncrement_' ] = 1 ; } $ number = ( $ this -> data [ '_NonDB_System_' ] [ '_AutoIncrement_' ] ++ ) ; $ this -> save ( ) ; return $ number ; }
Get Auto - Increment Number
17,883
private function init ( ) { $ this -> nb_response = new CNabuHTTPResponse ( $ this -> nb_plugins_manager , $ this ) ; $ this -> nb_site = null ; $ this -> nb_site_alias = null ; $ this -> nb_site_target = null ; $ this -> nb_language = null ; $ this -> user_remote_ip = null ; $ this -> user_agent = null ; $ this -> acc...
Initializes the instance . Reset all internal variables to init values .
17,884
private function locateURI ( ) : string { $ this -> page_uri = filter_input ( INPUT_GET , NABU_PATH_PARAM , FILTER_SANITIZE_STRING , FILTER_FLAG_EMPTY_STRING_NULL ) ; if ( ! is_string ( $ this -> page_uri ) || strlen ( $ this -> page_uri ) === 0 ) { $ this -> page_uri = $ this -> nb_application -> getHTTPServer ( ) -> ...
Search requested URIs using different alternatives .
17,885
public function getCombinedPostIndexes ( array $ fields = null ) { if ( $ fields === null ) { $ fields = $ this -> getPOSTFieldNames ( ) ; } $ keys = array ( ) ; if ( count ( $ fields ) > 0 ) { if ( is_array ( $ this -> xdr_post ) ) { foreach ( $ fields as $ field ) { if ( array_key_exists ( $ field , $ this -> xdr_pos...
Get all index key values of parameters containing arrays .
17,886
public function create ( array $ metadata ) { $ schema = $ this -> getSchemaFromMetadata ( $ metadata ) ; $ statements = $ schema -> toSql ( $ this -> platform ) ; $ this -> build ( $ statements ) ; return $ statements ; }
Create all tables .
17,887
public function update ( array $ metadata , $ saveMode = false ) { $ fromSchema = $ this -> schemaManager -> createSchema ( ) ; $ toSchema = $ this -> getSchemaFromMetadata ( $ metadata ) ; $ comparator = new Comparator ; $ schemaDiff = $ comparator -> compare ( $ fromSchema , $ toSchema ) ; if ( $ saveMode ) { $ state...
Update all tables .
17,888
public function drop ( array $ metadata ) { $ visitor = new DropSchemaSqlCollector ( $ this -> platform ) ; $ schema = $ this -> getSchemaFromMetadata ( $ metadata ) ; $ fullSchema = $ this -> schemaManager -> createSchema ( ) ; foreach ( $ fullSchema -> getTables ( ) as $ table ) { if ( $ schema -> hasTable ( $ table ...
Drop all tables .
17,889
public function getSchemaFromMetadata ( array $ metadata ) { $ entityMetadataSchemaConfig = $ this -> schemaManager -> createSchemaConfig ( ) ; $ schema = new Schema ( [ ] , [ ] , $ entityMetadataSchemaConfig ) ; $ pivotTables = [ ] ; foreach ( $ metadata as $ entityMetadata ) { $ this -> generateTableFromMetadata ( $ ...
Create schema instance from metadata
17,890
protected function generateTableFromMetadata ( $ schema , TableDefinition $ tableMetadata ) { $ primaryKeys = [ ] ; $ uniqueIndexes = [ ] ; $ indexes = [ ] ; $ table = $ schema -> createTable ( $ this -> connection -> getTablePrefix ( ) . $ tableMetadata [ 'name' ] ) ; foreach ( $ tableMetadata [ 'columns' ] as $ colum...
Generate a table from metadata .
17,891
protected function getDoctrineColumnOptions ( ColumnDefinition $ columnMetadata ) { $ options = $ columnMetadata [ 'options' ] ; if ( ! empty ( $ columnMetadata [ 'nullable' ] ) ) { $ options [ 'notnull' ] = ! $ columnMetadata [ 'nullable' ] ; } if ( ! empty ( $ columnMetadata [ 'default' ] ) ) { $ options [ 'default' ...
Get the doctrine column options .
17,892
public static function getMembersOfGroup ( $ nb_user_group ) : CNabuUserGroupMemberList { if ( is_numeric ( $ nb_user_group_id = nb_getMixedValue ( $ nb_user_group , 'nb_user_group_id' ) ) ) { $ retval = CNabuUserGroupMember :: buildObjectListFromSQL ( 'nb_user_id' , "select ugm.* " . "from nb_user_group_member ugm, nb...
Gets all Members of a Group .
17,893
public function getAll ( $ appId , $ scanId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> sinks ( ) -> getAll ( $ appId , $ scanId , $ queryParams ) ; return new SinksResponse ( $ response ) ; }
Get all sinks for a scan
17,894
public function getById ( $ appId , $ scanId , $ sinkId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> sinks ( ) -> getById ( $ appId , $ scanId , $ sinkId , $ queryParams ) ; return new SinkResponse ( $ response ) ; }
Get sink for scan by id
17,895
public function getAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> teams ( ) -> getAll ( $ queryParams ) ; return new TeamsResponse ( $ response ) ; }
Get all teams
17,896
public function getById ( $ teamId , array $ queryParams = [ ] ) { $ response = $ this -> api -> teams ( ) -> getById ( $ teamId , $ queryParams ) ; return new TeamResponse ( $ response ) ; }
Get team by id
17,897
public function create ( TeamBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> teams ( ) -> create ( $ input -> toArray ( ) , $ queryParams ) ; return new TeamResponse ( $ response ) ; }
Create a new team
17,898
public function update ( $ teamId , TeamBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> teams ( ) -> update ( $ teamId , $ input -> toArray ( ) , $ queryParams ) ; return new TeamResponse ( $ response ) ; }
Update an existing team
17,899
public function deleteAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> teams ( ) -> deleteAll ( $ queryParams ) ; return new BaseResponse ( $ response ) ; }
Delete all teams