idx
int64
0
241k
question
stringlengths
64
6.21k
target
stringlengths
5
803
236,800
public function getRawObjectByUid ( int $ uid , int $ languageUid = 0 , array $ querySettings = [ 'respectSysLanguage' => false ] ) { if ( $ uid && $ uid > 0 ) { $ query = $ this -> createquery ( ) ; $ settings = $ query -> getQuerySettings ( ) ; $ settings -> setLanguageUid ( $ languageUid ) ; $ query = $ this -> appl...
Gets a raw object by UID .
236,801
public function getRawModelByUid ( int $ uid , int $ languageUid = 0 , array $ querySettings = [ 'respectSysLanguage' => false ] ) { return $ this -> getRawObjectByUid ( $ uid , $ languageUid , $ querySettings ) ; }
Gets a raw model by UID alias for getRawObjectByUid .
236,802
public function findByPid ( int $ pid , int $ limit = 0 , array $ querySettings = [ 'respectSysLanguage' => true ] ) { if ( $ pid && $ pid > 0 ) { $ query = $ this -> createquery ( ) ; $ query = $ this -> applyQuerySettings ( $ query , $ querySettings ) ; $ query -> matching ( $ query -> equals ( 'pid' , $ pid ) ) ; if...
Finds objects by PID .
236,803
public function findByPids ( $ pids , int $ limit = 0 , array $ querySettings = [ 'respectSysLanguage' => true ] ) { if ( is_string ( $ pids ) ) { $ pids = GeneralUtility :: intExplode ( ',' , $ pids , true ) ; } if ( ! empty ( $ pids ) ) { $ query = $ this -> createquery ( ) ; $ query = $ this -> applyQuerySettings ( ...
Finds objects by multiple PIDs .
236,804
protected function applyQuerySettings ( $ query , array $ settings ) { if ( ! empty ( $ settings ) ) { $ respectStoragePage = $ settings [ 'respectStoragePage' ] ; if ( is_bool ( $ respectStoragePage ) ) { $ query -> getQuerySettings ( ) -> setRespectStoragePage ( $ respectStoragePage ) ; } $ respectSysLanguage = $ set...
Applies settings on a query .
236,805
protected function getOrderingsByField ( string $ field , array $ values , string $ order = QueryInterface :: ORDER_DESCENDING ) : array { $ orderings = [ ] ; if ( ! empty ( $ values ) ) { foreach ( $ values as $ value ) { $ orderings [ "$field={$value}" ] = $ order ; } } return $ orderings ; }
Gets the orderings by a field .
236,806
public function serialize ( $ object ) { if ( ! is_object ( $ object ) ) { throw new \ InvalidArgumentException ( 'Argument must be an object' ) ; } $ reflectedObject = new \ ReflectionObject ( $ object ) ; $ reflectedProperties = $ reflectedObject -> getProperties ( ) ; $ array = array ( ) ; foreach ( $ reflectedPrope...
Convert an object to a mongoable array
236,807
private function getValue ( $ object , \ ReflectionProperty $ property ) { $ value = null ; if ( $ property -> isPublic ( ) ) { $ value = $ property -> getValue ( $ object ) ; } else { $ accessorName = $ this -> formatter -> getPhpAccessor ( $ property -> getName ( ) , false ) ; $ reflectedObject = new \ ReflectionObje...
Return a value for an object property
236,808
private function setValue ( $ object , \ ReflectionProperty $ property , $ value ) { if ( $ property -> isPublic ( ) ) { $ property -> setValue ( $ object , $ value ) ; } else { $ mutatorName = $ this -> formatter -> getPhpMutator ( $ property -> getName ( ) , false ) ; $ reflectedObject = new \ ReflectionObject ( $ ob...
Define a value for an object property
236,809
public function get ( $ idOrDocument , $ type = Document :: DOCUMENT_TYPE_CLASSIFIED ) { $ neobazaarService = $ this -> getServiceLocator ( ) -> get ( 'neobazaar.service.main' ) ; $ classifiedService = $ this -> getServiceLocator ( ) -> get ( 'document.service.classified' ) ; $ documentRepository = $ neobazaarService -...
Fetch the correct model depending on user auth
236,810
public function afterSave ( ) { Yii :: app ( ) -> cache -> delete ( $ this -> theme . '_settings_tweets' ) ; Yii :: app ( ) -> cache -> delete ( $ this -> theme . '_settings_facebook_data' ) ; Yii :: app ( ) -> cache -> delete ( $ this -> theme . '_settings_g+_activities' ) ; return parent :: afterSave ( ) ; }
AfterSave Event Clears the local cache
236,811
public function getTweets ( $ postData = NULL ) { header ( "Content-Type: application/json" ) ; if ( $ this -> twitterHandle == NULL || $ this -> twitterTweetsToFetch == 0 ) return false ; try { $ connection = new TwitterOAuth ( Cii :: getConfig ( 'ha_twitter_key' , NULL , NULL ) , Cii :: getConfig ( 'ha_twitter_secret...
getTweets callback method
236,812
public function getGooglePlusPosts ( $ postData = NULL ) { $ key = Cii :: getConfig ( 'google_plus_public_server_key' ) ; if ( $ key == NULL || $ this -> googlePlusUserId == NULL ) return false ; $ result = Yii :: app ( ) -> cache -> get ( $ this -> theme . '_settings_g+_activities' ) ; if ( $ result == false ) { $ cli...
getGooglePlusPosts callback method Retrieves recent activities from Google +
236,813
protected function generateLink ( $ route , $ params = null ) { if ( $ route instanceof Closure ) { $ route = $ this -> stringify ( $ route ) ; } if ( \ Route :: has ( $ route ) ) { if ( empty ( $ params ) ) { return route ( $ this -> routify ( $ route ) ) ; } else { return route ( $ this -> routify ( $ route ) , $ thi...
This will generate a url relating to the given route whether that is from a raw url or if it is a route . It will also grab the params for the values .
236,814
private function run ( $ callback ) { $ injects = [ ] ; $ reflectionFunction = new \ ReflectionFunction ( $ callback ) ; foreach ( $ reflectionFunction -> getParameters ( ) as $ parameter ) { if ( $ class = $ parameter -> getClass ( ) ) { $ injects [ ] = app ( $ class -> name ) ; } } return call_user_func_array ( $ cal...
This is a dependancy injection function which allows the config function to have new classes without needing them to have a need for actually newing up the new objects .
236,815
function makeRequest ( $ method , $ url , $ apiRequest = null , $ queryString = null ) { $ urlEndPoint = $ this -> config -> getEndpoint ( ) . '/' . $ url ; $ this -> climate -> out ( $ this -> config -> getLoggerPrefix ( ) . 'URL: ' . $ urlEndPoint ) ; $ data = [ 'headers' => [ 'Authorization' => 'Bearer ' . $ this ->...
Make a request to the API using Guzzle
236,816
public function setConfigPath ( $ path ) { if ( file_exists ( $ path ) ) { $ this -> configPath = $ path ; } else { throw new Exception ( 'Configuration file could not be found at ' . htmlspecialchars ( $ path , ENT_QUOTES , 'UTF-8' ) ) ; } }
Sets the path to the configuration file
236,817
protected function _mergeConfig ( $ current , $ successor ) { if ( is_array ( $ current ) and is_array ( $ successor ) ) { foreach ( $ successor as $ key => $ value ) { if ( isset ( $ current [ $ key ] ) and is_array ( $ value ) and is_array ( $ current [ $ key ] ) ) { $ current [ $ key ] = $ this -> _mergeConfig ( $ c...
Merge config hashes recursivly
236,818
public function merge ( EntityMetadata $ metadata ) { $ this -> setType ( $ metadata -> type ) ; $ this -> setAbstract ( $ metadata -> isAbstract ( ) ) ; $ this -> setPolymorphic ( $ metadata -> isPolymorphic ( ) ) ; $ this -> extends = $ metadata -> extends ; $ this -> mergeAttributes ( $ metadata -> getAttributes ( )...
Merges an EntityMetadata instance with this instance . For use with entity class extension .
236,819
public function setType ( $ type ) { if ( ! is_string ( $ type ) || empty ( $ type ) ) { throw MetadataException :: invalidEntityType ( ) ; } $ this -> type = $ type ; return $ this ; }
Sets the entity type .
236,820
private function mergeAttributes ( array $ toAdd ) { $ this -> attributes = array_merge ( $ this -> attributes , $ toAdd ) ; ksort ( $ this -> attributes ) ; return $ this ; }
Merges attributes with this instance s attributes .
236,821
private function mergeRelationships ( array $ toAdd ) { $ this -> relationships = array_merge ( $ this -> relationships , $ toAdd ) ; ksort ( $ this -> relationships ) ; return $ this ; }
Merges relationships with this instance s relationships .
236,822
public function addAttribute ( AttributeMetadata $ attribute ) { if ( isset ( $ this -> relationships [ $ attribute -> getKey ( ) ] ) ) { throw MetadataException :: fieldKeyInUse ( 'attribute' , 'relationship' , $ attribute -> getKey ( ) , $ this -> type ) ; } $ this -> attributes [ $ attribute -> getKey ( ) ] = $ attr...
Adds an attribute field to this entity .
236,823
public function backup ( array $ data , $ model ) { $ directory = gplcart_file_private_module ( 'backup' ) ; if ( ! file_exists ( $ directory ) && ! mkdir ( $ directory , 0775 , true ) ) { return false ; } $ data [ 'type' ] = 'module' ; $ data [ 'name' ] = $ this -> translation -> text ( 'Module @name' , array ( '@name...
Creates a module backup
236,824
public static function flush ( ) { $ html = true ; foreach ( headers_list ( ) as $ header ) { if ( stripos ( $ header , 'content-type:' ) === 0 ) { if ( stripos ( $ header , 'application/javascript' ) !== false || stripos ( $ header , 'text/javascript' ) !== false ) { $ html = false ; } elseif ( stripos ( $ header , 't...
flush the messages to browser by adding to HTML page
236,825
public function execute ( InputInterface $ input , OutputInterface $ output ) { $ this -> output = $ output ; try { $ this -> doExecute ( $ input , $ output ) ; } catch ( \ Exception $ e ) { $ this -> writeException ( $ e ) ; } }
Execute command and type
236,826
protected function write ( $ message , array $ record = array ( ) ) { $ record = array_merge ( $ this -> defautlRecord , $ record ) ; $ record [ 'msg' ] = $ message ; $ this -> output -> writeln ( $ this -> formatter -> format ( $ record ) ) ; }
Write a message with extra record params
236,827
protected function writeException ( \ Exception $ exception , array $ record = array ( ) ) { $ record = array_merge ( $ this -> defautlRecord , $ record ) ; $ this -> output -> writeln ( $ this -> formatter -> formatException ( $ exception , $ record ) ) ; }
Write an exception with extra record params
236,828
public function boot ( Application $ app , ConfigContract & $ appConfig ) { $ appConfig -> set ( 'database.connections.' . $ this -> connection , $ this -> options ) ; $ appConfig -> set ( 'database.default' , $ this -> connection ) ; $ app -> useDatabasePath ( $ this -> path ) ; }
Run setup component .
236,829
public function addContent ( $ content ) { if ( $ content instanceof Page ) { $ this -> addPage ( $ content ) ; } else { if ( $ content ) { $ this -> addChild ( $ content ) ; } else { throw new Exception ( "Unknown content type." ) ; } } }
Add content to site .
236,830
public function addChild ( Content $ child ) { $ this -> pages [ $ child -> id ] = $ child ; if ( ! isset ( $ this -> categories [ $ child -> category ] ) ) { $ this -> categories [ $ child -> category ] = [ ] ; } $ this -> categories [ $ child -> category ] [ ] = $ child ; }
Add child to page .
236,831
final public function restore ( $ fname = null ) { if ( is_null ( $ fname ) ) { $ fname = $ this -> database ; } if ( $ this -> pathExtension ( $ fname ) === '' ) { $ fname .= '.sql' ; } if ( $ this -> pathDirname ( $ fname ) === '.' ) { $ fname = $ _SERVER [ 'DOCUMENT_ROOT' ] . DIRECTORY_SEPARATOR . $ fname ; } if ( @...
Restore a file from a mysqldump
236,832
public function all ( $ directory = '/' ) { $ directories = $ this -> directories ( $ directory ) -> transform ( function ( $ item ) { return $ item + [ 'type' => self :: MEDIA_TYPE_DIRECTORY ] ; } ) ; $ files = $ this -> files ( $ directory ) -> transform ( function ( array $ item ) { return $ item + [ 'type' => self ...
Get all the directories & files from a given location .
236,833
public function files ( $ directory ) { $ this -> checkDirectory ( $ directory ) ; $ disk = $ this -> disk ( ) ; $ files = array_map ( function ( $ filePath ) use ( $ disk , $ directory ) { return [ 'name' => str_replace ( "$directory/" , '' , $ filePath ) , 'path' => $ filePath , 'url' => $ disk -> url ( $ filePath ) ...
Get a collection of all files in a directory .
236,834
public function file ( $ path ) { return $ this -> files ( dirname ( $ path ) ) -> first ( function ( $ file ) use ( $ path ) { return $ file [ 'path' ] === $ path ; } , function ( ) use ( $ path ) { throw new FileNotFoundException ( "File [$path] not found!" ) ; } ) ; }
Get the file details .
236,835
public function storeMany ( $ directory , array $ files ) { $ uploaded = [ ] ; foreach ( $ files as $ file ) { $ uploaded [ $ directory . '/' . $ file -> getClientOriginalName ( ) ] = $ this -> store ( $ directory , $ file ) ; } return $ uploaded ; }
Store an array of files .
236,836
public function isExcludedDirectory ( $ directory ) { foreach ( $ this -> getExcludedDirectories ( ) as $ pattern ) { if ( Str :: is ( $ pattern , $ directory ) ) return true ; } return false ; }
Check if the directory is excluded .
236,837
protected function checkDirectory ( & $ directory ) { $ directory = trim ( $ directory , '/' ) ; $ this -> checkDirectoryExists ( $ directory ) ; $ this -> checkDirectoryAccess ( $ directory ) ; }
Check the given directory location .
236,838
public static function get_instance ( $ site_id ) { global $ wpdb ; $ site_id = ( int ) $ site_id ; if ( ! $ site_id ) { return false ; } $ _site = wp_cache_get ( $ site_id , 'sites' ) ; if ( ! $ _site ) { $ _site = $ wpdb -> get_row ( $ wpdb -> prepare ( "SELECT * FROM {$wpdb->blogs} WHERE blog_id = %d LIMIT 1" , $ si...
Retrieves a site from the database by its ID .
236,839
public function __isset ( $ key ) { switch ( $ key ) { case 'id' : case 'network_id' : return true ; case 'blogname' : case 'siteurl' : case 'post_count' : case 'home' : if ( ! did_action ( 'ms_loaded' ) ) { return false ; } return true ; default : if ( ! did_action ( 'ms_loaded' ) ) { return false ; } $ details = $ th...
Isset - er .
236,840
private function get_details ( ) { $ details = wp_cache_get ( $ this -> blog_id , 'site-details' ) ; if ( false === $ details ) { switch_to_blog ( $ this -> blog_id ) ; $ details = new stdClass ( ) ; foreach ( get_object_vars ( $ this ) as $ key => $ value ) { $ details -> $ key = $ value ; } $ details -> blogname = ge...
Retrieves the details for this site .
236,841
public static function getsessionIdApiCall ( $ login , $ password ) { $ sessionId = "" ; try { $ response = self :: $ buzz -> get ( self :: BASE_URL . '/User/sessionId?login=' . $ login . '&password=' . $ password ) ; $ sessionId = str_replace ( '"' , '' , $ response -> getContent ( ) ) ; } catch ( \ Exception $ e ) { ...
Session ID Queue
236,842
protected static function createRequestParameters ( $ sessionId , $ sourceAddres , $ destinationAddress , $ data , $ sendDate = null , $ validity = 0 ) { $ parameters = array ( 'sessionId' => $ sessionId , 'sourceAddress' => $ sourceAddres , 'data' => $ data ) ; if ( gettype ( $ destinationAddress ) == "string" ) { $ p...
SMS send request parameters preparation
236,843
protected function checkSecurity ( $ intention , $ resource = null ) { $ securityMapping = $ this -> getSecurityMapping ( ) ; return $ this -> container -> get ( 'security.authorization_checker' ) -> isGranted ( ( array ) ( empty ( $ securityMapping [ $ intention ] ) ? $ intention : $ securityMapping [ $ intention ] ) ...
checks security for given intention
236,844
protected function extractQueryFilter ( Request $ request ) { return array_map ( function ( $ value ) { return array_filter ( explode ( ',' , trim ( $ value , ',' ) ) , function ( $ var ) { return ! empty ( $ var ) ; } ) ; } , $ request -> query -> all ( ) ) ; }
Extract available query filter from request .
236,845
protected function retrieveOr404 ( $ entityId , $ loaderId ) { if ( ! $ this -> container -> has ( $ loaderId ) ) { throw new NotFoundHttpException ( sprintf ( 'Unknow required loader : "%s"' , $ loaderId ) ) ; } if ( ! $ entity = $ this -> container -> get ( $ loaderId ) -> retrieve ( $ entityId ) ) { throw $ this -> ...
Retrieves entity for given id into given repository service .
236,846
protected function create404 ( $ entityId , $ loaderId ) { return new NotFoundHttpException ( sprintf ( 'Entity with id "%s" not found%s.' , $ entityId , $ this -> container -> getParameter ( 'kernel.debug' ) ? sprintf ( ' : (looked into "%s")' , $ loaderId ) : '' ) ) ; }
create a formatted http not found exception .
236,847
public function destroyModel ( $ model , $ path = null ) { $ this -> model = $ model ; try { if ( ! $ this -> model -> delete ( ) ) { throw new DestroyException ( $ this -> model ) ; } event ( new $ this -> events [ 'success' ] ( $ this -> model ) ) ; if ( is_null ( $ path ) ) { return response ( ) -> json ( $ this -> ...
destroy data of the eloquent model or models
236,848
protected function destroyGroupAction ( $ class ) { $ result = $ class :: destroy ( $ this -> request -> id ) ; if ( is_integer ( $ result ) && $ result > 0 ) { return true ; } return false ; }
destroy group action
236,849
protected function notPublishGroupAction ( $ class ) { try { if ( ! $ class :: whereIn ( 'id' , $ this -> request -> id ) -> update ( [ 'is_publish' => false ] ) ) { throw new UpdateException ( $ this -> request -> id , 'group not not published' ) ; } event ( new $ this -> events [ 'success' ] ( $ this -> request -> id...
not publish group action
236,850
protected function fillModel ( $ datas ) { $ grouped = collect ( $ datas ) -> groupBy ( 'relation_type' ) ; foreach ( $ grouped as $ key => $ groups ) { if ( $ key === 'not' ) { foreach ( $ groups as $ group ) { $ this -> model -> fill ( $ group [ 'datas' ] ) -> save ( ) ; } continue ; } if ( $ key === 'hasOne' ) { for...
fill model datas to database
236,851
protected function getData ( ) { if ( ! $ this -> fileOptions ) { return $ this -> request -> all ( ) ; } $ excepts = collect ( $ this -> fileOptions ) -> keyBy ( function ( $ item ) { $ columns = explode ( '.' , $ item [ 'column' ] ) ; return count ( $ columns ) === 1 ? $ columns [ 0 ] : $ columns [ 1 ] ; } ) -> keys ...
get data if image column passed except it
236,852
private function preUploadFile ( $ exception ) { $ datas = [ ] ; foreach ( $ this -> fileOptions as $ options ) { $ result = $ this -> uploadFile ( $ options ) ; if ( $ result !== false ) { $ datas [ ] = $ result ; } } if ( ! empty ( $ datas ) && ! $ this -> fillModel ( $ datas ) ) { throw new $ exception ( $ this -> r...
pre upload file control function
236,853
protected function uploadFile ( $ options ) { if ( $ options [ 'type' ] === 'file' ) { $ this -> repo = new FileRepository ( $ options ) ; $ this -> hasFile = true ; } else { $ this -> repo = new ImageRepository ( $ options ) ; $ this -> hasPhoto = true ; } if ( ! $ this -> repo -> upload ( $ this -> model , $ this -> ...
upload file or files
236,854
protected function returnData ( $ type ) { $ data = [ 'result' => $ type ] ; if ( $ this -> hasPhoto ) { $ data [ 'photos' ] = $ this -> repo -> files ; } if ( $ this -> hasFile ) { $ data [ 'files' ] = $ this -> repo -> files ; } return $ data ; }
return data for api
236,855
protected function redirectRoute ( $ path , $ isUpdate = false ) { $ indexPos = strpos ( $ path , 'index' ) ; $ dotPos = strpos ( $ path , '.' ) ; $ slug = getModelSlug ( $ this -> model ) ; if ( $ indexPos === false && $ dotPos === false ) { return redirect ( lmbRoute ( "admin.{$slug}.{$path}" , [ 'id' => $ this -> mo...
return redirect url path
236,856
protected function setElfinderToOptions ( $ column ) { $ this -> fileOptions = collect ( $ this -> fileOptions ) -> map ( function ( $ item , $ key ) use ( $ column ) { if ( ( is_array ( $ column ) && $ key === $ column [ 'index' ] && $ item [ 'column' ] === $ column [ 'column' ] ) || $ item [ 'column' ] === $ column )...
set to file options is file from elfinder
236,857
protected function updateAlias ( $ model , $ events = [ ] , $ path = null ) { $ namespace = getBaseName ( $ model , 'Events' ) ; $ events = $ events ? $ events : [ 'success' => "{$namespace}\\UpdateSuccess" , 'fail' => "{$namespace}\\UpdateFail" , ] ; $ this -> setEvents ( $ events ) ; return $ this -> updateModel ( $ ...
update alias method
236,858
protected function groupAlias ( $ model , $ subBase = 'Events' ) { $ namespace = getBaseName ( $ model , $ subBase ) ; $ events = [ ] ; switch ( $ this -> request -> action ) { case 'activate' : $ events [ 'activationSuccess' ] = \ ErenMustafaOzdal \ LaravelUserModule \ Events \ Auth \ ActivateSuccess :: class ; $ even...
group operation alias method
236,859
protected function cloneModel ( $ model , $ lastCopy , $ changeColumns = [ ] , $ relations = [ ] ) { $ clone = $ model -> replicate ( ) ; $ clone -> copied_id = $ model -> id ; if ( is_null ( $ lastCopy ) ) { foreach ( $ changeColumns as $ column ) { $ clone -> $ column = "{$model->$column}-2" ; } } else { foreach ( $ ...
clone model and relation
236,860
protected function setModuleThumbnails ( $ category , $ model , $ uploadType ) { $ module = getModule ( get_called_class ( ) ) ; if ( is_null ( $ category -> thumbnails ) ) { return ; } Config :: set ( "{$module}.{$model}.uploads.{$uploadType}.thumbnails" , $ category -> thumbnails -> map ( function ( $ item ) { return...
set the module config
236,861
protected function listRunnables ( ) { $ commands = array_values ( Command :: getRegisteredCommands ( ) ) ; $ format = "| %8.60s | %-50.30s\n" ; printf ( $ format , "id" , "class" ) ; $ this -> env -> sendOutput ( '-----------------------------------' ) ; foreach ( $ commands as $ runnable ) { printf ( $ format , $ run...
Lists all registered runnables id .
236,862
protected function createRunnable ( ) { $ runnable = new StdClass ( ) ; $ response = $ this -> cmd -> question ( '1. Runnable class name? [required]' ) ; if ( strlen ( $ response ) < 3 ) { return $ this -> env -> sendOutput ( 'runnable class name is required.' , 'red' ) ; } $ runnable -> name = rtrim ( $ response ) ; $...
Creates a new runnable class .
236,863
protected function listRunnableCommands ( String $ runnableId ) { if ( ! Command :: hasCommand ( $ runnableId ) ) { $ this -> cmd -> error ( sprintf ( '[%s] is not a valid runnable id' , $ runnableId ) ) ; } $ runnable = Command :: getCommandById ( $ runnableId ) ; $ commands = $ runnable -> runnableCommands ( ) ; $ fo...
Lists commands available in a runnable object .
236,864
protected function displayHelpInformation ( ) { $ this -> env -> sendOutput ( 'PhoxPHP Command Line Interface help.' , 'green' ) ; $ this -> env -> sendOutput ( 'Usage:' . $ this -> env -> addTab ( ) . 'php console [command id] [...arguments]' ) ; $ this -> env -> sendOutput ( $ this -> env -> addTab ( ) . 'E.g: ' . 'p...
Displays cli help information .
236,865
protected function validate ( ) { if ( empty ( $ this -> author ) ) { throw new \ Exception ( 'Author is empty!' ) ; } if ( empty ( $ this -> classname ) ) { throw new \ Exception ( 'Class name is empty!' ) ; } if ( empty ( $ this -> namespace ) ) { throw new \ Exception ( 'Namespace is empty!' ) ; } if ( empty ( $ thi...
Check if config has required values .
236,866
protected function symlinkLegacyExtensionSiteAccesses ( string $ legacyExtensionPath , OutputInterface $ output ) : void { $ legacyRootDir = $ this -> getContainer ( ) -> getParameter ( 'ezpublish_legacy.root_dir' ) ; $ directories = [ ] ; $ path = $ legacyExtensionPath . '/root_' . $ this -> environment . '/settings/s...
Symlinks siteccesses from a legacy extension .
236,867
protected function symlinkLegacyExtensionOverride ( string $ legacyExtensionPath , OutputInterface $ output ) : void { $ legacyRootDir = $ this -> getContainer ( ) -> getParameter ( 'ezpublish_legacy.root_dir' ) ; $ sourceFolder = $ legacyExtensionPath . '/root_' . $ this -> environment . '/settings/override' ; if ( ! ...
Symlinks override folder from a legacy extension .
236,868
public function getRootPath ( ) { $ appPath = app_path ( ) ; $ folders = explode ( DIRECTORY_SEPARATOR , $ appPath ) ; array_pop ( $ folders ) ; $ rootPath = implode ( DIRECTORY_SEPARATOR , $ folders ) ; return $ rootPath . '/' ; }
Return path to the Laravel project root
236,869
public function indexAction ( Request $ request ) { $ response = $ this -> getCacheTimeKeeper ( ) -> getResponse ( 'AnimeDbCatalogBundle:Label' ) ; if ( $ response -> isNotModified ( $ request ) ) { return $ response ; } $ rep = $ this -> getDoctrine ( ) -> getManager ( ) -> getRepository ( 'AnimeDbCatalogBundle:Label'...
Edit labels .
236,870
private function MakeWords ( $ chunks ) { $ words = array ( ) ; $ index = 0 ; foreach ( $ chunks as $ chunk ) { $ one = isset ( $ chunk { 0 } ) ? intval ( $ chunk { 0 } ) : null ; $ ten = isset ( $ chunk { 1 } ) ? intval ( $ chunk { 1 } ) : null ; $ hundred = isset ( $ chunk { 2 } ) ? intval ( $ chunk { 2 } ) : null ; ...
Takes an array of number chunks in string form and generates the corresponding word forms of those chunks . It then reorganizes the chunks into the correct order .
236,871
public function filterByMime ( $ mime = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ mime ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_MIME , $ mime , $ comparison ) ; }
Filter the query on the mime column
236,872
public function filterBySha1 ( $ sha1 = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ sha1 ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_SHA1 , $ sha1 , $ comparison ) ; }
Filter the query on the sha1 column
236,873
public function filterByThumburl ( $ thumburl = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ thumburl ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_THUMBURL , $ thumburl , $ comparison ) ; }
Filter the query on the thumburl column
236,874
public function filterByThumbmime ( $ thumbmime = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ thumbmime ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_THUMBMIME , $ thumbmime , $ comparison ) ; }
Filter the query on the thumbmime column
236,875
public function filterByThumbwidth ( $ thumbwidth = null , $ comparison = null ) { if ( is_array ( $ thumbwidth ) ) { $ useMinMax = false ; if ( isset ( $ thumbwidth [ 'min' ] ) ) { $ this -> addUsingAlias ( MediaTableMap :: COL_THUMBWIDTH , $ thumbwidth [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } ...
Filter the query on the thumbwidth column
236,876
public function filterByThumbheight ( $ thumbheight = null , $ comparison = null ) { if ( is_array ( $ thumbheight ) ) { $ useMinMax = false ; if ( isset ( $ thumbheight [ 'min' ] ) ) { $ this -> addUsingAlias ( MediaTableMap :: COL_THUMBHEIGHT , $ thumbheight [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = tru...
Filter the query on the thumbheight column
236,877
public function filterByThumbsize ( $ thumbsize = null , $ comparison = null ) { if ( is_array ( $ thumbsize ) ) { $ useMinMax = false ; if ( isset ( $ thumbsize [ 'min' ] ) ) { $ this -> addUsingAlias ( MediaTableMap :: COL_THUMBSIZE , $ thumbsize [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } if ( i...
Filter the query on the thumbsize column
236,878
public function filterByDescriptionurl ( $ descriptionurl = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ descriptionurl ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_DESCRIPTIONURL , $ descriptionurl , $ comparison ) ; }
Filter the query on the descriptionurl column
236,879
public function filterByDescriptionurlshort ( $ descriptionurlshort = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ descriptionurlshort ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_DESCRIPTIONURLSHORT , $ descriptionurlshort , $ compar...
Filter the query on the descriptionurlshort column
236,880
public function filterByImagedescription ( $ imagedescription = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ imagedescription ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_IMAGEDESCRIPTION , $ imagedescription , $ comparison ) ; }
Filter the query on the imagedescription column
236,881
public function filterByDatetimeoriginal ( $ datetimeoriginal = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ datetimeoriginal ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_DATETIMEORIGINAL , $ datetimeoriginal , $ comparison ) ; }
Filter the query on the datetimeoriginal column
236,882
public function filterByArtist ( $ artist = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ artist ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_ARTIST , $ artist , $ comparison ) ; }
Filter the query on the artist column
236,883
public function filterByLicenseshortname ( $ licenseshortname = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ licenseshortname ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_LICENSESHORTNAME , $ licenseshortname , $ comparison ) ; }
Filter the query on the licenseshortname column
236,884
public function filterByUsageterms ( $ usageterms = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ usageterms ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_USAGETERMS , $ usageterms , $ comparison ) ; }
Filter the query on the usageterms column
236,885
public function filterByAttributionrequired ( $ attributionrequired = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ attributionrequired ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_ATTRIBUTIONREQUIRED , $ attributionrequired , $ compar...
Filter the query on the attributionrequired column
236,886
public function filterByRestrictions ( $ restrictions = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ restrictions ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_RESTRICTIONS , $ restrictions , $ comparison ) ; }
Filter the query on the restrictions column
236,887
public function filterByTimestamp ( $ timestamp = null , $ comparison = null ) { if ( is_array ( $ timestamp ) ) { $ useMinMax = false ; if ( isset ( $ timestamp [ 'min' ] ) ) { $ this -> addUsingAlias ( MediaTableMap :: COL_TIMESTAMP , $ timestamp [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } if ( i...
Filter the query on the timestamp column
236,888
public function filterByUser ( $ user = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ user ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_USER , $ user , $ comparison ) ; }
Filter the query on the user column
236,889
public function filterByMissing ( $ missing = null , $ comparison = null ) { if ( is_string ( $ missing ) ) { $ missing = in_array ( strtolower ( $ missing ) , array ( 'false' , 'off' , '-' , 'no' , 'n' , '0' , '' ) ) ? false : true ; } return $ this -> addUsingAlias ( MediaTableMap :: COL_MISSING , $ missing , $ compa...
Filter the query on the missing column
236,890
public function filterByKnown ( $ known = null , $ comparison = null ) { if ( is_string ( $ known ) ) { $ known = in_array ( strtolower ( $ known ) , array ( 'false' , 'off' , '-' , 'no' , 'n' , '0' , '' ) ) ? false : true ; } return $ this -> addUsingAlias ( MediaTableMap :: COL_KNOWN , $ known , $ comparison ) ; }
Filter the query on the known column
236,891
public function filterByImagerepository ( $ imagerepository = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ imagerepository ) ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( MediaTableMap :: COL_IMAGEREPOSITORY , $ imagerepository , $ comparison ) ; }
Filter the query on the imagerepository column
236,892
public function useC2MQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinC2M ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'C2M' , '\Attogram\SharedMedia\Orm\C2MQuery' ) ; }
Use the C2M relation C2M object
236,893
public function filterByM2P ( $ m2P , $ comparison = null ) { if ( $ m2P instanceof \ Attogram \ SharedMedia \ Orm \ M2P ) { return $ this -> addUsingAlias ( MediaTableMap :: COL_ID , $ m2P -> getMediaId ( ) , $ comparison ) ; } elseif ( $ m2P instanceof ObjectCollection ) { return $ this -> useM2PQuery ( ) -> filterBy...
Filter the query by a related \ Attogram \ SharedMedia \ Orm \ M2P object
236,894
public function authorize ( $ redirect_uri , $ scope = Client :: SCOPE_READ ) { header ( 'Location: ' . $ this -> getAuthorizeUri ( $ redirect_uri , $ scope ) ) ; exit ; }
Begin authorization .
236,895
public function getAuthorizeUri ( $ redirect_uri , $ scope = Client :: SCOPE_READ ) { $ state = sha1 ( mt_rand ( ) ) ; $ _SESSION [ $ this -> oauth_key ] = [ 'redirect_uri' => $ redirect_uri , 'scope' => $ scope , 'state' => $ state , ] ; return $ this -> client -> authorizationEndpoint ( ) . '?' . http_build_query ( [...
Generate and return the authorization URI .
236,896
public function getAuthorizationCode ( ) { if ( isset ( $ _GET [ 'error' ] ) ) { throw new OAuthException ( $ _GET [ 'error' ] , 1 ) ; } elseif ( ! isset ( $ _GET [ 'code' ] ) || ! isset ( $ _GET [ 'state' ] ) ) { throw new OAuthException ( 'Invalid parameters' , 2 ) ; } elseif ( ! isset ( $ _SESSION [ $ this -> oauth_...
Obtain an authorization code .
236,897
public function getToken ( $ authorization_code = null ) { if ( $ authorization_code == null ) { $ authorization_code = $ this -> getAuthorizationCode ( ) ; } $ params = $ _SESSION [ $ this -> oauth_key ] ; unset ( $ _SESSION [ $ this -> oauth_key ] ) ; $ response = $ this -> client -> post ( 'oauth/token' , [ 'client_...
Swap an authorization code for a token .
236,898
public function getEnumValues ( $ tableName , $ columnName ) { if ( ! $ this -> columnExists ( $ tableName , $ columnName ) ) { throw new \ PDOException ( sprintf ( "Unknown column '%s' in table '%s'." , $ columnName , $ tableName ) ) ; } $ dataType = $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'da...
return all possible options of an enum or set attribute
236,899
public function publish ( \ Caridea \ Event \ Event $ event ) { foreach ( iterator_to_array ( $ this -> listeners ) as $ listener ) { $ listener -> notify ( $ event ) ; } }
Queues an event to be sent to Listeners .