idx int64 0 241k | question stringlengths 64 6.21k | target stringlengths 5 803 |
|---|---|---|
17,400 | public function setRoot ( string $ root = "F" ) : CNabuDataObject { if ( $ root === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$root" ) ) ; } $ this -> setValue ( 'nb_role_root' , $ root ) ; return $ this ; } | Sets the Role Root attribute value . |
17,401 | public static function hydrateCollection ( array $ patches ) { $ hydrated = [ ] ; foreach ( $ patches as $ patch ) { $ hydrated [ ] = self :: hydrate ( $ patch ) ; } return $ hydrated ; } | Hydrate a collection of patch objects into a collection of PatchEntity objects |
17,402 | static public function getSiteTargetSections ( $ nb_site_target ) { $ nb_site_target_id = nb_getMixedValue ( $ nb_site_target , 'nb_site_target_id' ) ; if ( is_numeric ( $ nb_site_target_id ) ) { $ retval = CNabuSiteTargetSection :: buildObjectListFromSQL ( 'nb_site_target_section_id' , 'select * ' . 'from nb_site_targ... | Gets entire collection of Section instances of a Site Target . |
17,403 | public function registerApplication ( INabuApplication $ nb_application ) { if ( $ this -> nb_application !== null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_RUNNING_APPLICATION ) ; } $ this -> nb_application = $ nb_application ; $ this -> nb_provider_factory -> registerApplication ( $ this -> nb_ap... | Set the running application . |
17,404 | public function getMessagingPoolManager ( bool $ force = false ) : CNabuMessagingPoolManager { if ( $ this -> nb_customer instanceof CNabuCustomer ) { if ( $ this -> nb_messaging_pool_manager === null || $ force ) { if ( $ this -> nb_messaging_pool_manager instanceof CNabuMessagingPoolManager ) { $ this -> nb_messaging... | Gets current Messaging Pool Manager instance . If not defined then creates one for the current Customer . |
17,405 | public function getRenderPoolManager ( bool $ force = false ) : CNabuRenderPoolManager { if ( $ this -> nb_customer instanceof CNabuCustomer ) { if ( $ this -> nb_render_pool_manager === null || $ force ) { if ( $ this -> nb_render_pool_manager instanceof CNabuRenderPoolManager ) { $ this -> nb_render_pool_manager -> f... | Gets current Render Pool Manager instance . If not defined then creates one for the current Customer . |
17,406 | public function getHTTPServerPoolManager ( bool $ force = false ) : CNabuHTTPServerPoolManager { if ( $ this -> nb_http_server_pool_manager === null || $ force ) { if ( $ this -> nb_http_server_pool_manager instanceof CNabuHTTPServerPoolManager ) { $ this -> nb_http_server_pool_manager -> finish ( ) ; } $ this -> nb_ht... | Gets current HTTP Server Pool Manager instance . If not defined then creates one for the current Customer . |
17,407 | private function class2Filename ( $ class_name , $ php_suffix = '.php' ) { return DIRECTORY_SEPARATOR . str_replace ( '\\' , DIRECTORY_SEPARATOR , $ class_name ) . ( $ php_suffix === false ? '' : $ php_suffix ) ; } | Convert a class name with namespace path to file name with namespace translated into File System path . The returned string start with the directory separator to safe prepend a route before it . |
17,408 | private function init ( ) { $ this -> microtime_start = microtime ( true ) ; $ this -> nb_os = CNabuOS :: getOS ( ) ; try { $ this -> registerHandlers ( ) ; $ this -> registerProviderFactory ( ) ; } catch ( ENabuException $ nb_exception ) { if ( $ this -> isCLIEnvironment ( ) ) { throw $ nb_exception ; } else { nb_disp... | Initializes the instance . Register handlers . Register main database . |
17,409 | private function finish ( ) { if ( $ this -> main_database !== null ) { $ this -> main_database -> disconnect ( ) ; } $ this -> microtime_end = microtime ( true ) ; $ this -> microtime_elapsed = $ this -> microtime_end - $ this -> microtime_start ; $ this -> traceLog ( "Execution time" , sprintf ( "%.3f ms" , $ this ->... | Ends the instance . Takes the elapsed time between init and finish calls and closes connections to external sources . |
17,410 | private function registerMainDatabase ( ) { $ filename = NABU_ETC_PATH . DIRECTORY_SEPARATOR . NABU_DB_DEFAULT_FILENAME_CONFIG ; if ( ! file_exists ( $ filename ) && ( $ file = fopen ( $ filename , "w" ) ) !== false ) { fwrite ( $ file , "<?php\n" . "\$db_user = \"nabu-3\";\n" . "\$db_passwd = \"nabu-3\";\n" . "\$db_ho... | If database configuration file does not exists then creates a default one . Instantiate the object descriptor for main database . Assumes in this version that the only database engine available for main storage is MySQL . |
17,411 | public function getMainDB ( ) { if ( $ this -> main_database === null && ( $ this -> isOperationModeCLI ( ) || $ this -> isOperationModeStandalone ( ) ) ) { $ this -> registerMainDatabase ( ) ; } return $ this -> main_database ; } | Get main database connection . |
17,412 | public function setMainDB ( INabuDBConnector $ connector ) { if ( $ this -> isInstallMode ( ) ) { if ( $ this -> main_database === null ) { $ this -> main_database = $ connector ; } else { throw new ENabuCoreException ( ENabuCoreException :: ERROR_MAIN_DB_ALREADY_EXISTS ) ; } } else { throw new ENabuCoreException ( ENa... | Database connector to main Nabu database schema This method is allowed only when Engine is in install mode |
17,413 | public function traceLog ( $ key , $ message ) { if ( $ this -> nb_error_handler ) { $ this -> nb_error_handler -> traceLog ( $ key , $ message ) ; } return $ this ; } | If a Error Handler is defined then propagates the trace log to the handler elsewhere do nothing . |
17,414 | public function triggerError ( $ error_message = null , $ error_type = null ) { if ( $ error_message !== null && $ error_type !== null ) { trigger_error ( $ error_message , $ error_type ) ; } } | Trigger and error using the standard PHP Error chain . |
17,415 | public function runApplication ( $ class_name ) { $ this -> traceLog ( 'Request timestamp' , $ this -> microtime_start ) ; try { switch ( self :: $ operation_mode ) { case self :: ENGINE_MODE_STANDALONE : $ this -> locateHTTPServer ( ) ; $ this -> createBuiltInServer ( ) ; $ this -> createBuiltInSite ( ) ; break ; case... | Executes an Application instance in the Nabu Engine environment . |
17,416 | private function callLocateHTTPServerHook ( ) { if ( is_string ( self :: $ locateHTTPServerHook ) ) { $ { self :: $ locateHTTPServerHook } ( $ this -> nb_http_server ) ; } elseif ( self :: $ locateHTTPServerHook instanceof Closure ) { ( self :: $ locateHTTPServerHook ) ( $ this -> nb_http_server ) ; } } | Calls the Hook function after locate valid HTTP Server . |
17,417 | private function locateHTTPServer ( ) { $ this -> nb_http_server = null ; if ( self :: isCLIEnvironment ( ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_METHOD_NOT_AVAILABLE , array ( __METHOD__ ) ) ; } elseif ( $ this -> nb_http_server === null ) { $ this -> getHTTPServerPoolManager ( ) ; $ this -> n... | Try to detect the running HTTP Server attached to this process and returns their nabu - 3 manager . |
17,418 | private function createBuiltInServer ( ) { $ nb_server = new CNabuBuiltInServer ( ) ; $ nb_server_host = new CNabuBuiltInServerHost ( ) ; $ host_path = $ this -> nb_http_server -> getHostBaseDirectory ( ) ; $ server_path = dirname ( $ host_path ) ; $ nb_server -> setBasePath ( NABU_BASE_PATH ) ; $ nb_server -> setVirtu... | Create the BuiltIn Server . If operation mode is setted to Standalone or Hosted the BuiltIn Server is required due to the application instance cannot run in more than one server . |
17,419 | private function createBuiltInSite ( ) { $ this -> nb_customer = new CNabuBuiltInCustomer ( ) ; $ nb_site = new CNabuBuiltInSite ( ) ; $ nb_site_alias = new CNabuBuiltInSiteAlias ( ) ; $ nb_domain_zone = new CNabuBuiltInDomainZone ( ) ; $ nb_domain_zone_host = new CNabuBuiltInDomainZoneHost ( ) ; $ server_name = $ this... | Create the BuiltIn Site . If operation mode is setted to Standalone the BuiltIn Site is required due to the HTTP Server cannot execute more than one application instance . |
17,420 | public function getPHPIncludeFolders ( ) { if ( ! is_array ( $ this -> framework_folders ) ) { $ this -> framework_folders = array ( ) ; if ( is_dir ( NABU_SRC_PATH ) ) { $ this -> framework_folders [ ] = realpath ( NABU_SRC_PATH ) ; } if ( is_dir ( NABU_SDK_PATH ) ) { $ this -> framework_folders [ ] = realpath ( NABU_... | Gets the list of PHP root folders in the framework for include purposes . |
17,421 | public function getProviderManager ( string $ vendor_key , string $ module_key ) { if ( $ this -> nb_provider_factory instanceof CNabuProviderFactory ) { return $ this -> nb_provider_factory -> getManager ( $ vendor_key , $ module_key ) ; } else { throw new ENabuProviderException ( ENabuProviderException :: ERROR_PROVI... | Gets a Provider Manager instance . This method is intended normally to be used internally and inside provider modules . |
17,422 | public function getProviderInterfaceDescriptor ( string $ vendor , string $ module , int $ interface_type , string $ interface ) { return $ this -> nb_provider_factory -> getInterfaceDescriptor ( $ vendor , $ module , $ interface_type , $ interface ) ; } | Gets a Provider Interface descriptor . |
17,423 | public function getProviderInterfaceDescriptorByKey ( int $ interface_type , string $ interface_key ) { return $ this -> nb_provider_factory -> getInterfaceDescriptors ( $ interface_type ) -> getItem ( $ interface_key ) ; } | Gets a Provider Interface Descriptor by his interface type and key . |
17,424 | protected function extractNodes ( CNabuDataObject $ item ) { $ retval = null ; if ( $ item instanceof INabuTranslated ) { if ( $ item -> hasTranslations ( ) ) { $ nodes = array ( ) ; $ main_index_name = $ this -> list -> getIndexedFieldName ( ) ; $ item -> getTranslations ( ) -> iterate ( function ( $ key , $ translati... | Extract Nodes list for translations in an item in this node . |
17,425 | public static function getTemplatesForService ( $ nb_messaging_service ) : CNabuMessagingServiceTemplateList { if ( is_numeric ( $ nb_messaging_service_id = nb_getMixedValue ( $ nb_messaging_service , NABU_MESSAGING_SERVICE_FIELD_ID ) ) ) { $ retval = CNabuMessagingServiceTemplate :: buildObjectListFromSQL ( 'nb_messag... | Gets the list of Template Connections for a Service . |
17,426 | public static function hydrateCollection ( array $ scans ) { $ hydrated = [ ] ; foreach ( $ scans as $ scan ) { $ hydrated [ ] = self :: hydrate ( $ scan ) ; } return $ hydrated ; } | Hydrate a collection of scan objects into a collection of ScanEntity objects |
17,427 | public function applyRoleMask ( CNabuRole $ nb_role , array $ additional = null ) { $ total = $ this -> getSize ( ) ; $ count = 0 ; $ this -> iterate ( function ( $ key , INabuRoleMask $ item ) use ( $ count , $ nb_role , $ additional ) { if ( $ item -> applyRoleMask ( $ nb_role , $ additional ) ) { $ count ++ ; } else... | Applies Role policies to this list . All items that does not accomplishes the policies are removed . |
17,428 | public function setIcontactId ( int $ nb_icontact_id ) : CNabuDataObject { if ( $ nb_icontact_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_icontact_id" ) ) ; } $ this -> setValue ( 'nb_icontact_id' , $ nb_icontact_id ) ; return $ this ; } | Sets the Icontact Id attribute value . |
17,429 | public static function hydrateCollection ( array $ licenses ) { $ hydrated = [ ] ; foreach ( $ licenses as $ license ) { $ hydrated [ ] = self :: hydrate ( $ license ) ; } return $ hydrated ; } | Hydrate a collection of license objects into a collection of LicenseEntity objects |
17,430 | public static function hydrate ( stdClass $ license ) { $ hydrated = new LicenseEntity ( ) ; if ( isset ( $ license -> id ) ) { $ hydrated -> setId ( $ license -> id ) ; } if ( isset ( $ license -> created_at ) ) { $ hydrated -> setCreatedAt ( new DateTime ( $ license -> created_at ) ) ; } if ( isset ( $ license -> val... | Hydrate a license object into a LicenseEntity object |
17,431 | public function setUserId ( int $ nb_user_id ) : CNabuDataObject { if ( $ nb_user_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_user_id" ) ) ; } $ this -> setValue ( 'nb_user_id' , $ nb_user_id ) ; return $ this ; } | Sets the User Id attribute value . |
17,432 | public function setCatalogTaxonomyId ( int $ nb_catalog_taxonomy_id ) : CNabuDataObject { if ( $ nb_catalog_taxonomy_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_catalog_taxonomy_id" ) ) ; } $ this -> setValue ( 'nb_catalog_taxonomy_id' , $ nb_cata... | Sets the Catalog Taxonomy Id attribute value . |
17,433 | public function getAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> orgs ( ) -> getAll ( $ queryParams ) ; return new OrgsResponse ( $ response ) ; } | Get all organizations |
17,434 | public function getById ( $ orgId , array $ queryParams = [ ] ) { $ response = $ this -> api -> orgs ( ) -> getById ( $ orgId , $ queryParams ) ; return new OrgResponse ( $ response ) ; } | Get an organization by id |
17,435 | public function update ( $ orgId , OrgBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> orgs ( ) -> update ( $ orgId , $ input -> toArray ( ) , $ queryParams ) ; return new OrgResponse ( $ response ) ; } | Update existing organization by id |
17,436 | public function deleteAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> orgs ( ) -> deleteAll ( $ queryParams ) ; return new BaseResponse ( $ response ) ; } | Delete all organizations |
17,437 | public function deleteById ( $ orgId , array $ queryParams = [ ] ) { $ response = $ this -> api -> orgs ( ) -> deleteById ( $ orgId , $ queryParams ) ; return new BaseResponse ( $ response ) ; } | Delete an organization by id |
17,438 | public function setEnabled ( string $ enabled = "T" ) : CNabuDataObject { if ( $ enabled === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$enabled" ) ) ; } $ this -> setValue ( 'nb_site_lang_enabled' , $ enabled ) ; return $ this ; } | Sets the Site Lang Enabled attribute value . |
17,439 | public function setTranslationStatus ( string $ translation_status = "D" ) : CNabuDataObject { if ( $ translation_status === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$translation_status" ) ) ; } $ this -> setValue ( 'nb_site_lang_translation_status' , $ t... | Sets the Site Lang Translation Status attribute value . |
17,440 | public function setEditable ( string $ editable = "F" ) : CNabuDataObject { if ( $ editable === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$editable" ) ) ; } $ this -> setValue ( 'nb_site_lang_editable' , $ editable ) ; return $ this ; } | Sets the Site Lang Editable attribute value . |
17,441 | protected function normalizeKey ( $ cacheId ) { $ cacheId = parent :: normalizeKey ( $ cacheId ) ; if ( ( $ pattern = $ this -> cache -> getOptions ( ) -> getKeyPattern ( ) ) && ! preg_match ( $ pattern , $ cacheId ) ) { $ pattern = str_replace ( array ( '^[' , '*$' ) , array ( '[^' , '' ) , $ pattern ) ; $ cacheId = p... | normalizes the cache id for zend cache |
17,442 | public function flush ( ) { if ( ! ( $ this -> cache instanceof FlushableInterface ) ) { return false ; } try { return $ this -> cache -> flush ( ) ; } catch ( ZendException \ ExceptionInterface $ ex ) { return false ; } } | Flush the whole storage |
17,443 | public function setMediotecaId ( int $ nb_medioteca_id ) : CNabuDataObject { if ( $ nb_medioteca_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_medioteca_id" ) ) ; } $ this -> setValue ( 'nb_medioteca_id' , $ nb_medioteca_id ) ; return $ this ; } | Sets the Medioteca Id attribute value . |
17,444 | public function findOne ( ) { foreach ( $ this -> data as $ k => $ v ) { $ key = $ k ; break ; } if ( is_array ( $ this -> data [ $ key ] ) ) { return ( new \ NonDB \ Data ( $ this -> data [ $ key ] , $ key ) ) -> setParent ( $ this ) ; } else { return $ this -> data [ $ key ] ; } } | Get one of the data . |
17,445 | public function findByKey ( $ rule ) { $ r = [ ] ; foreach ( $ this -> data as $ k => $ v ) { if ( $ rule ( $ k ) ) { $ r [ ] = $ this -> { $ k } ; } } return $ r ; } | Find something by the key |
17,446 | public function sort ( $ rule , $ algorithm = "DefaultSort" ) { $ class = "\\NonDB\\Sorter\\" . $ algorithm ; if ( ! class_exists ( $ class ) || ! ( \ NonDB \ Components \ Tool :: checkImplement ( $ class , "NonDB\\Interfaces\\Sorter" ) ) ) { throw new \ NonDB \ Exceptions \ DataException ( "Sorter $class didn't exists... | Sort The Data |
17,447 | public static function hydrateCollection ( array $ clients ) { $ hydrated = [ ] ; foreach ( $ clients as $ client ) { $ hydrated [ ] = self :: hydrate ( $ client ) ; } return $ hydrated ; } | Hydrate a collection of client object into a collection of ClientEntity objects |
17,448 | public static function hydrate ( stdClass $ client ) { $ hydrated = new ClientEntity ( ) ; if ( isset ( $ client -> id ) ) { $ hydrated -> setId ( $ client -> id ) ; } if ( isset ( $ client -> name ) ) { $ hydrated -> setName ( $ client -> name ) ; } if ( isset ( $ client -> random_id ) ) { $ hydrated -> setRandomId ( ... | Hydrate a client object into a ClientEntity object |
17,449 | public static function getAllCatalogs ( 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_catalog_id' , 'select * ' . 'from n... | Get all items in the storage as an associative array where the field nb_catalog_id is the index and each value is an instance of class CNabuCatalogBase . |
17,450 | public function getCatalog ( $ force = false ) { if ( $ this -> nb_catalog === null || $ force ) { $ this -> nb_catalog = null ; if ( $ this instanceof CNabuDataObject && ! $ this -> isBuiltIn ( ) && $ this -> isValueNumeric ( NABU_CATALOG_FIELD_ID ) ) { $ nb_aux_catalog = new CNabuCatalog ( $ this -> getValue ( NABU_C... | Gets the Catalog instance that owns this object . |
17,451 | public function setCatalog ( CNabuCatalog $ nb_catalog ) { $ this -> nb_catalog = $ nb_catalog ; if ( $ this instanceof CNabuDataObject && $ nb_catalog -> contains ( NABU_CATALOG_FIELD_ID ) ) { $ this -> transferValue ( $ nb_catalog , NABU_CATALOG_FIELD_ID ) ; } return $ this ; } | Sets the Catalog instance that onws this object . |
17,452 | public static function getFactory ( ) { if ( self :: $ nb_provider_factory === null ) { self :: $ nb_provider_factory = new CNabuProviderFactory ( ) ; self :: $ nb_provider_factory -> init ( ) ; } return self :: $ nb_provider_factory ; } | If singleton instance does not exists then instantiate it . |
17,453 | public function scanProvidersFolder ( ) { $ folders = array ( ) ; $ this -> scanVendorFolders ( $ folders ) ; if ( count ( $ folders ) > 0 ) { foreach ( $ folders as $ provider ) { try { nb_requireOnceIsolated ( $ provider , true , true ) ; } catch ( Exception $ ex ) { throw new ENabuProviderException ( ENabuProviderEx... | Scan providers folder to detect installed provider modules . |
17,454 | private function scanVendorFolders ( & $ folders ) { $ basedir = realpath ( NABU_PROVIDERS_PATH ) ; if ( is_dir ( $ basedir ) && ( $ h = opendir ( $ basedir ) ) ) { while ( ( $ folder = readdir ( $ h ) ) ) { if ( $ folder !== '.' && $ folder !== '..' ) { $ this -> scanModuleFolders ( $ basedir . DIRECTORY_SEPARATOR . $... | Scan vendor folders to find modules . |
17,455 | private function scanModuleFolders ( $ basedir , & $ folders ) { if ( is_dir ( $ basedir ) && ( $ h = opendir ( $ basedir ) ) ) { while ( ( $ folder = readdir ( $ h ) ) ) { if ( $ folder !== '.' && $ folder !== '..' ) { $ this -> scanModuleFiles ( $ basedir . DIRECTORY_SEPARATOR . $ folder , $ folders ) ; } } closedir ... | Scan module folders to prepare init mechanism . |
17,456 | private function scanModuleFiles ( $ basedir , & $ folders ) { if ( is_dir ( $ basedir ) && ( $ h = opendir ( $ basedir ) ) ) { while ( ( $ filename = readdir ( $ h ) ) ) { $ phpfile = $ basedir . DIRECTORY_SEPARATOR . $ filename ; if ( preg_match ( '/^init[_|-](.+)\.php$/' , $ filename ) && file_exists ( $ phpfile ) &... | Scan module root files to locate the init file . |
17,457 | public function addManager ( INabuProviderManager $ nb_manager ) { $ vendor_key = $ nb_manager -> getVendorKey ( ) ; if ( nb_isValidKey ( $ vendor_key ) ) { $ module_key = $ nb_manager -> getModuleKey ( ) ; if ( ! nb_isValidKey ( $ module_key ) ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_MODU... | Adds a manager to the managers list . |
17,458 | public function getManager ( string $ vendor_key , string $ module_key ) { if ( nb_isValidKey ( $ vendor_key ) && nb_isValidKey ( $ module_key ) ) { return $ this -> nb_manager_list -> getItem ( "$vendor_key:$module_key" ) ; } else { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INVALID_KEYS ) ; } ... | Gets a Manager instance . This method is intended normally to be used internally and inside provider modules . |
17,459 | public function addInterface ( CNabuProviderInterfaceDescriptor $ nb_descriptor ) { $ interface_type = $ nb_descriptor -> getType ( ) ; if ( ! array_key_exists ( $ interface_type , $ this -> nb_interface_list ) ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INTERFACE_TYPE_NOT_EXISTS , array ( pr... | Adds an interface to the interfaces list . |
17,460 | public function getInterfaceDescriptors ( int $ interface_type ) { if ( ! array_key_exists ( $ interface_type , $ this -> nb_interface_list ) ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INTERFACE_TYPE_NOT_EXISTS , array ( print_r ( $ interface_type , true ) ) ) ; } return $ this -> nb_interfa... | Gets the interfaces descriptor list of a type of interfaces . |
17,461 | public function getInterfaceDescriptor ( string $ vendor , string $ module , int $ interface_type , string $ interface ) { if ( ! array_key_exists ( $ interface_type , $ this -> nb_interface_list ) ) { throw new ENabuProviderException ( ENabuProviderException :: ERROR_INTERFACE_TYPE_NOT_EXISTS , array ( print_r ( $ int... | Gets an Interface descriptor . |
17,462 | public function registerApplication ( INabuApplication $ nb_application ) { $ this -> nb_manager_list -> iterate ( function ( $ key , $ manager ) use ( $ nb_application ) { $ manager -> registerApplication ( $ nb_application ) ; return true ; } ) ; } | Register the application to connect all available managers with it . |
17,463 | public function getComparison ( $ appId , $ scanId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> comparisons ( ) -> getComparison ( $ appId , $ scanId , $ queryParams ) ; return new ComparisonResponse ( $ response ) ; } | Get comparison stats for a scan |
17,464 | public static function hydrateCollection ( array $ sinks ) { $ hydrated = [ ] ; foreach ( $ sinks as $ sink ) { $ hydrated [ ] = self :: hydrate ( $ sink ) ; } return $ hydrated ; } | Hydrate a collection of sink objects into a collection of SinkEntity objects |
17,465 | public function getAll ( $ appId , $ profileId , array $ queryParams ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> validators ( ) -> getAll ( $ appId , $ profileId , $ queryParams ) ; return new ValidatorsResponse ( $ response ) ; } | Get all validators for a profile profile |
17,466 | public function getById ( $ appId , $ profileId , $ validatorId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> validators ( ) -> getById ( $ appId , $ profileId , $ validatorId , $ queryParams ) ; return new ValidatorResponse ( $ response ) ; } | Get validator for profile profile by id |
17,467 | public function create ( $ appId , $ profileId , ValidatorBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> validators ( ) -> create ( $ appId , $ profileId , $ input -> toArray ( ) , $ queryParams ) ; return new ValidatorResponse ( $ response ) ; } | Create validator for profile profile |
17,468 | public function setSiteTargetId ( int $ nb_site_target_id ) : CNabuDataObject { if ( $ nb_site_target_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_site_target_id" ) ) ; } $ this -> setValue ( 'nb_site_target_id' , $ nb_site_target_id ) ; return $ t... | Sets the Site Target Id attribute value . |
17,469 | protected function init ( ) { $ this -> prepareHTTPManagers ( ) ; $ this -> prepareHTTPRendersManager ( ) ; $ this -> prepareMediotecasManager ( ) ; $ this -> nb_engine -> registerApplication ( $ this ) ; } | Initializes the instance and register them in the Engine . |
17,470 | final public function run ( ) { $ this -> nb_http_server = $ this -> nb_engine -> getHTTPServer ( ) ; if ( ! ( $ this -> nb_http_server instanceof INabuHTTPServerInterface ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_HTTP_SERVER_NOT_FOUND ) ; } $ this -> prepareSecurityManager ( ) ; $ this -> prepar... | Executes the Application runtime . |
17,471 | public function getAll ( $ appId = null , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> getAll ( $ appId , $ queryParams ) ; return new ProfilesResponse ( $ response ) ; } | Get all profile profiles for an application |
17,472 | public function getById ( $ appId , $ profileId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> getById ( $ appId , $ profileId , $ queryParams ) ; return new ProfileResponse ( $ response ) ; } | Get profile for profile profile by id |
17,473 | public function create ( $ appId , ProfileBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> create ( $ appId , $ input -> toArray ( ) , $ queryParams ) ; return new ProfileResponse ( $ response ) ; } | Create a profile profile for an application |
17,474 | public function update ( $ appId , $ profileId , ProfileBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> update ( $ appId , $ profileId , $ input -> toArray ( ) , $ queryParams ) ; return new ProfileResponse ( $ response ) ; } | Update a profile profile by id |
17,475 | public function getMessaging ( CNabuCustomer $ nb_customer = null , string $ field = NABU_MESSAGING_FIELD_ID , bool $ force = false ) { if ( $ nb_customer !== null && ( $ this -> nb_messaging === null || $ force ) ) { $ this -> nb_messaging = null ; if ( $ this instanceof CNabuDataObject && $ this -> contains ( NABU_ME... | Gets the Messaging instance . |
17,476 | public function getAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> getAll ( $ queryParams ) ; return new UsersResponse ( $ response ) ; } | Get a collection of user objects |
17,477 | public function getById ( $ userId , array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> getById ( $ userId , $ queryParams ) ; return new UserResponse ( $ response ) ; } | Get a user by id |
17,478 | public function deleteAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> deleteAll ( $ queryParams ) ; return new BaseResponse ( $ response ) ; } | Delete all users |
17,479 | public function deleteById ( $ userId , array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> deleteById ( $ userId , $ queryParams ) ; return new BaseResponse ( $ response ) ; } | Delete user by id |
17,480 | public function reset ( $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> reset ( $ input -> toArray ( ) , $ queryParams ) ; return new UserResponse ( $ response ) ; } | Request a reset email |
17,481 | public function activate ( $ userId , $ token , array $ queryParams = [ ] ) { $ response = $ this -> api -> users ( ) -> activate ( $ userId , $ token , $ queryParams ) ; return new UserResponse ( $ response ) ; } | Active a user account |
17,482 | public function getAll ( $ appId , $ scanId , $ issueId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> reviews ( ) -> getAll ( $ appId , $ scanId , $ issueId , $ queryParams ) ; return new ReviewsResponse ( $ response ) ; } | Get all reviews for an issue |
17,483 | public function getById ( $ appId , $ scanId , $ issueId , $ reviewId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> reviews ( ) -> getById ( $ appId , $ scanId , $ issueId , $ reviewId , $ queryParams ) ; return new ReviewResponse ( $ response ) ; } | Get review for issue by id |
17,484 | public function create ( $ appId , $ scanId , $ issueId , ReviewBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> reviews ( ) -> create ( $ appId , $ scanId , $ issueId , $ input -> toArray ( ) , $ queryParams ) ; return new ReviewResponse ( $ r... | Create a new review for an issue |
17,485 | public static function hydrateCollection ( array $ phps ) { $ hydrated = [ ] ; foreach ( $ phps as $ php ) { $ hydrated [ ] = self :: hydrate ( $ php ) ; } return $ hydrated ; } | Hydrate a collection of php objects into a collection of PhpEntity objects |
17,486 | public static function hydrate ( stdClass $ php ) { $ hydrated = new PhpEntity ( ) ; if ( isset ( $ php -> id ) ) { $ hydrated -> setId ( $ php -> id ) ; } if ( isset ( $ php -> major_version ) ) { $ hydrated -> setMajorVersion ( $ php -> major_version ) ; } if ( isset ( $ php -> minor_version ) ) { $ hydrated -> setMi... | Hydrate a php object into a PhpEntity object |
17,487 | public function configure ( $ name ) { if ( isset ( $ this -> loadedConfigurations [ $ name ] ) ) { return ; } $ this -> loadedConfigurations [ $ name ] = true ; $ path = $ this -> getConfigurationPath ( $ name ) ; if ( ! \ is_null ( $ path ) ) { $ this -> make ( 'config' ) -> set ( Arr :: dot ( [ $ name => require $ p... | Load a configuration file into the application . |
17,488 | public function getProviders ( $ provider ) { $ name = \ is_string ( $ provider ) ? $ provider : \ get_class ( $ provider ) ; return Arr :: where ( $ this -> loadedProviders , function ( $ value ) use ( $ name ) { return $ value instanceof $ name ; } ) ; } | Get the registered service provider instances if any exist . |
17,489 | public function resourcePath ( $ path = '' ) { if ( $ this -> resourcePath ) { return $ this -> resourcePath . ( $ path ? '/' . $ path : $ path ) ; } return $ this -> basePath ( 'resources' . ( $ path ? '/' . $ path : $ path ) ) ; } | Get the resource path for the application . |
17,490 | public static function hydrateCollection ( array $ sources ) { $ hydrated = [ ] ; foreach ( $ sources as $ source ) { $ hydrated [ ] = self :: hydrate ( $ source ) ; } return $ hydrated ; } | Hydrate a collection of source objects into a collection of SourceEntity objects |
17,491 | public static function getTypesForIContact ( $ nb_icontact ) { if ( is_numeric ( $ nb_icontact_id = nb_getMixedValue ( $ nb_icontact , 'nb_icontact_id' ) ) ) { $ retval = CNabuIContactProspectStatusType :: buildObjectListFromSQL ( 'nb_icontact_prospect_status_type_id' , 'SELECT ipst.* FROM nb_icontact... | Gets all Types associated with an iContact . |
17,492 | public static function getSiteRolesForSite ( $ nb_site ) : CNabuSiteRoleList { if ( is_numeric ( $ nb_site_id = nb_getMixedValue ( $ nb_site , NABU_SITE_FIELD_ID ) ) ) { $ retval = CNabuSiteRole :: buildObjectListFromSQL ( 'nb_role_id' , 'select * ' . 'from nb_site_role ' . 'where nb_site_id=%site_id$d' , array ( 'site... | Get the list of all Roles assigned to a Site . |
17,493 | public static function getAllMediotecaItems ( CNabuMedioteca $ nb_medioteca ) { $ nb_medioteca_id = nb_getMixedValue ( $ nb_medioteca , 'nb_medioteca_id' ) ; if ( is_numeric ( $ nb_medioteca_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_medioteca_item_id' , 's... | Get all items in the storage as an associative array where the field nb_medioteca_item_id is the index and each value is an instance of class CNabuMediotecaItemBase . |
17,494 | static public function getSiteTargetCTAs ( $ nb_site_target ) { $ nb_site_target_id = nb_getMixedValue ( $ nb_site_target , 'nb_site_target_id' ) ; if ( is_numeric ( $ nb_site_target_id ) ) { $ retval = CNabuSiteTargetCTA :: buildObjectListFromSQL ( 'nb_site_target_cta_id' , 'select * ' . 'from nb_site_target_cta ' . '... | Gets entire collection of CTA instances of a Site Target . |
17,495 | public function getCTATarget ( ) { if ( ! ( $ this -> nb_site_target_destination instanceof CNabuSiteTarget ) && $ this -> getTargetUseURI ( ) === CNabuSiteTargetLink :: USE_URI_TRANSLATED && is_numeric ( $ this -> getTargetId ( ) ) ) { $ this -> nb_site_target_destination = $ this -> nb_site_target -> getSite ( ) -> g... | Gets the Site Target destination instance . |
17,496 | public function setCTATarget ( CNabuSiteTarget $ nb_site_target = null ) { if ( $ nb_site_target instanceof CNabuSiteTarget ) { $ this -> setTargetUseURI ( CNabuSiteTargetLink :: USE_URI_TRANSLATED ) ; $ this -> transferValue ( $ nb_site_target , 'nb_site_target_id' , 'nb_site_target_cta_target_id' ) ; } else { $ this ... | Sets the CTA Target object . Updates nb_site_target_cta_target_id and nb_site_target_cta_use_uri to proper values . |
17,497 | public function addRole ( CNabuSiteTargetCTARole $ nb_role ) { if ( $ nb_role -> isValueNumeric ( NABU_ROLE_FIELD_ID ) || $ nb_role -> isValueGUID ( NABU_ROLE_FIELD_ID ) ) { $ nb_role -> setSiteTargetCTA ( $ this ) ; $ this -> nb_site_target_cta_role_list -> addItem ( $ nb_role ) ; } return $ nb_role ; } | Add a Role to this Site Target CTA instance . |
17,498 | public static function getCTAOfSite ( $ nb_site , $ nb_site_target_cta ) { $ retval = null ; if ( is_numeric ( $ nb_site_id = nb_getMixedValue ( $ nb_site , NABU_SITE_FIELD_ID ) ) && is_numeric ( $ nb_site_target_cta_id = nb_getMixedValue ( $ nb_site_target_cta , NABU_SITE_TARGET_CTA_FIELD_ID ) ) ) { $ retval = CNabuSi... | Gets a CTA instance related with a Site . |
17,499 | public static function hydrate ( stdClass $ setting ) { $ hydrated = new SettingEntity ( ) ; if ( isset ( $ setting -> id ) ) { $ hydrated -> setId ( $ setting -> id ) ; } if ( isset ( $ setting -> issue_types ) ) { $ hydrated -> setIssueTypes ( $ setting -> issue_types ) ; } if ( isset ( $ setting -> code_stored ) ) {... | Hydrate a setting object into a SettingEntity object |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.