idx int64 0 60.3k | question stringlengths 64 4.24k | target stringlengths 5 618 |
|---|---|---|
21,100 | public function getVersion ( $ version ) { foreach ( $ this -> versions as $ versionPattern ) { if ( preg_match ( $ versionPattern [ 'regex' ] , $ version ) ) { return $ versionPattern [ 'version' ] ; } } throw new VersionException ( 'Version not found' ) ; } | Get the defined version for folders . We throw an exception in case of a non - matching version . |
21,101 | public function getLanguage ( $ file = '' ) { $ path = $ this -> path . DIRECTORY_SEPARATOR . $ file . '.php' ; if ( file_exists ( $ path ) ) { $ variables = require $ path ; return $ variables ; } else { return false ; } } | get the language variables with file path |
21,102 | public function registerSecurityFirewalls ( Application $ app ) { $ app [ 'security.firewalls' ] = $ app -> share ( function ( ) { return [ 'base.api' => [ 'pattern' => '^/' , 'oauth' => true , ] , ] ; } ) ; $ app [ 'security.access_rules' ] = $ app -> share ( function ( ) { return [ ] ; } ) ; } | Register the security firewalls for use with the Security Context in SecurityServiceProvider |
21,103 | public function pageAction ( $ path ) { $ parts = explode ( '/' , $ path ) ; $ result = $ this -> get ( 'asf_document.page.manager' ) -> getRepository ( ) -> findBySlug ( $ path ) ; if ( count ( $ result ) == 0 ) { throw new NotFoundHttpException ( 'Ooops ! Page not found.' ) ; } $ page = $ result [ 0 ] ; return $ this -> render ( 'ASFWebsiteBundle:Public:page.html.twig' , array ( 'page' => $ page ) ) ; } | Website Page Controller |
21,104 | public function getItem ( $ key , $ default = null ) { if ( isset ( $ this -> container [ $ key ] ) ) { return $ this -> container [ $ key ] ; } return $ default ; } | Gets the item value . |
21,105 | public function merge ( $ source ) { if ( $ source instanceof MergingInterface ) { $ source = $ source -> toArray ( ) ; } elseif ( $ source instanceof Traversable ) { $ source = iterator_to_array ( $ source ) ; } elseif ( $ source instanceof \ stdClass ) { $ source = ( array ) $ source ; } elseif ( ! is_array ( $ source ) ) { throw new InvalidArgumentException ( sprintf ( 'Failed to merge with source of type "%s".' , is_object ( $ source ) ? get_class ( $ source ) : gettype ( $ source ) ) ) ; } $ this -> container = $ this -> arrayMerge ( $ this -> container , $ source ) ; } | Merges data from other data sources . |
21,106 | protected function arrayMerge ( array $ target , array $ source ) { foreach ( $ source as $ key => $ value ) { if ( $ value instanceof MergingInterface ) { $ value = $ value -> toArray ( ) ; } if ( isset ( $ target [ $ key ] ) || array_key_exists ( $ key , $ target ) ) { if ( is_int ( $ key ) ) { $ target [ ] = $ value ; } elseif ( is_array ( $ value ) && is_array ( $ target [ $ key ] ) ) { $ target [ $ key ] = $ this -> arrayMerge ( $ target [ $ key ] , $ value ) ; } else { $ target [ $ key ] = $ value ; } } else { $ target [ $ key ] = $ value ; } } return $ target ; } | Merge data from two arrays . |
21,107 | public static function Af2a ( $ s , $ ideg , $ iamin , $ asec , & $ rad ) { $ rad = ( $ s == '-' ? - 1.0 : 1.0 ) * ( 60.0 * ( 60.0 * ( ( double ) abs ( $ ideg ) ) + ( ( double ) abs ( $ iamin ) ) ) + abs ( $ asec ) ) * DAS2R ; if ( $ ideg < 0 || $ ideg > 359 ) return 1 ; if ( $ iamin < 0 || $ iamin > 59 ) return 2 ; if ( $ asec < 0.0 || $ asec >= 60.0 ) return 3 ; return 0 ; } | - - - - - - - - i a u A f 2 a - - - - - - - - |
21,108 | public function matchRequest ( \ TYPO3 \ Flow \ Mvc \ RequestInterface $ request ) { foreach ( $ this -> subPatterns as $ pattern ) { if ( $ pattern -> matchRequest ( $ request ) === FALSE ) { return FALSE ; } } return TRUE ; } | Matches a \ TYPO3 \ Flow \ Mvc \ RequestInterface against its set pattern rules |
21,109 | public function addDriver ( DriverInterface $ driver , $ factor = 1 ) { $ id = $ this -> getDriverId ( $ driver ) ; $ this -> factors [ $ id ] = $ this -> fixFactor ( $ factor ) ; $ this -> drivers [ $ id ] = $ driver ; return $ this ; } | Specify a weighting factor for the driver . normally 1 - 10 |
21,110 | public function getDriver ( $ tag = '' ) { $ matched = $ this -> driverMatcher ( $ tag ) ; if ( count ( $ matched ) > 0 ) { return $ this -> drivers [ $ matched [ rand ( 1 , count ( $ matched ) ) - 1 ] ] ; } else { throw new NotFoundException ( Message :: get ( Message :: DB_DRIVER_NOTFOUND ) , Message :: DB_DRIVER_NOTFOUND ) ; } } | Get a driver with a tag matched |
21,111 | protected function driverMatcher ( $ tag ) { $ matched = [ ] ; foreach ( $ this -> drivers as $ id => $ driver ) { if ( $ this -> tagMatched ( $ tag , $ driver ) && $ this -> pingDriver ( $ driver ) ) { $ this -> expandWithFactor ( $ matched , $ id ) ; } } return $ matched ; } | Match drivers with tag |
21,112 | private function copyDir ( $ from , $ to ) { mkdir ( $ to , 0777 , true ) ; $ items = new FilesystemIterator ( $ from ) ; foreach ( $ items as $ item ) { $ pattern = preg_quote ( $ from , "/" ) ; $ Key = preg_replace ( "/^{$pattern}/" , "" , $ item ) ; $ subFrom = strval ( $ item ) ; $ subTo = $ to . $ Key ; if ( filetype ( $ item ) == 'dir' ) { $ this -> copyDir ( $ subFrom , $ subTo ) ; } else { $ this -> copyFile ( $ subFrom , $ subTo ) ; } } return true ; } | Copy Directory Recursive |
21,113 | public function post ( ) { $ json = $ this -> result -> toJson ( ) ; $ this -> log -> debug ( "AbstractCommand (" . get_class ( $ this ) . "): response json: $json" ) ; $ result = Util :: post ( $ this -> config -> slack_webhook_url , $ json ) ; if ( ! $ result ) { $ this -> log -> error ( "AbstractCommand: Error sending json: $json to slack hook: " . $ this -> config -> slack_webhook_url ) ; } return $ result ; } | Post the SlackResult json representation to the Slack Incoming WebHook . |
21,114 | private function name ( $ extra ) { $ file = $ extra [ 0 ] ; $ file = str_replace ( '.' , '/' , $ file ) ; switch ( $ extra [ 1 ] ) { case 'smarty' : $ extention = '.tpl.php' ; break ; case 'atom' : $ extention = '.atom' ; break ; default : $ extention = '.php' ; break ; } return $ file . $ extention ; } | Get the path name and type of view . |
21,115 | public function toArray ( ) { return array ( 'optional' => $ this -> param -> isOptional ( ) , 'default' => $ this -> param -> isDefaultValueAvailable ( ) ? $ this -> param -> getDefaultValue ( ) : null ) ; } | Return a representation of the current param . |
21,116 | public static function init ( array $ config = [ ] , $ devMode = false ) { if ( static :: $ instance instanceof static ) { return ; } $ system = static :: $ instance = new static ( ) ; $ system -> devMode = ( bool ) $ devMode ; $ services = $ system -> getServices ( ) ; $ services -> set ( 'System' , $ system ) ; $ items = [ ] ; if ( isset ( $ config [ 'components' ] ) ) { $ items = ( array ) $ config [ 'components' ] ; } $ components = $ system -> getComponents ( ) ; foreach ( $ items as $ index => $ item ) { $ config [ 'components' ] [ $ index ] = $ components -> register ( $ item ) ; } $ systemConfig = new SystemConfig ( $ config ) ; $ services -> set ( 'Config' , $ systemConfig ) ; $ listeners = new Listeners ( ) ; $ services -> set ( 'Listeners' , $ listeners ) ; $ events = new Events ( ) ; $ services -> set ( 'Events' , $ events ) ; $ components -> init ( $ services , $ listeners , $ events , $ systemConfig ) ; $ events -> trigger ( $ system -> getEvent ( ) ) ; return $ system ; } | Initializes system . Returns an instance of the system only once at initialization . |
21,117 | public function run ( ) { $ services = $ this -> getServices ( ) ; $ events = $ services -> get ( 'Events' ) ; $ event = $ this -> getEvent ( ) ; $ event -> setContext ( $ this ) ; $ course = [ SystemEvent :: BOOTSTRAP , SystemEvent :: ROUTE , SystemEvent :: DISPATCH , SystemEvent :: RENDER , ] ; try { foreach ( $ course as $ eventName ) { if ( $ event -> getResult ( SystemEvent :: FINISH ) ) { break ; } $ events -> trigger ( $ event ( $ eventName ) ) ; } $ events -> trigger ( $ event ( SystemEvent :: FINISH ) ) ; } catch ( Error $ ex ) { $ error = new ErrorEvent ( ErrorEvent :: FATAL_ERROR , $ ex , $ this ) ; $ events -> trigger ( $ error ) ; } catch ( Exception $ ex ) { $ error = new ErrorEvent ( ErrorEvent :: FATAL_ERROR , $ ex , $ this ) ; $ events -> trigger ( $ error ) ; } } | Runs system . |
21,118 | public function create ( $ repository ) { if ( is_string ( $ repository ) ) { clearstatcache ( TRUE ) ; if ( ! is_dir ( $ repository ) ) { throw new FileNotFoundException ( $ repository ) ; } $ repository = new FilesystemRepository ( $ repository ) ; } if ( ! ( $ repository instanceof FilesystemRepository ) ) { throw new \ RuntimeException ( sprintf ( 'Expected instance of FilesystemRepository. %s given' , get_class ( $ repository ) ) ) ; } $ locator = new Locator ( $ repository ) ; return $ locator ; } | Create locator from repository . Repository could be a FilesystemRepository or a valid path |
21,119 | public function load ( $ path , LocatorInterface $ locator , array $ loaders = [ ] , array $ config = [ ] ) { $ resource = $ locator -> locate ( $ path ) ; if ( count ( $ loaders ) < 1 ) { $ loaders = [ new PhpLoader ( ) , new JsonLoader ( ) ] ; } foreach ( $ loaders as $ loader ) { if ( pathinfo ( $ resource -> getPath ( ) , PATHINFO_EXTENSION ) !== $ loader -> getExtension ( ) ) { continue ; } $ config = $ loader -> load ( $ resource ) ; break ; } return $ config ; } | Load configuration from locator |
21,120 | public function getRawFileUrl ( $ slug , $ branch , $ path ) { return sprintf ( '%s/%s/%s/%s' , $ this -> rawHost , $ slug , $ branch , $ path ) ; } | Get repository raw file |
21,121 | public static function attributes ( array $ attributes = array ( ) ) { $ text = array ( ) ; foreach ( $ attributes as $ key => $ value ) { if ( is_numeric ( $ key ) ) { $ value = htmlspecialchars ( $ value ) ; if ( ! isset ( $ attributes [ $ value ] ) ) { $ text [ ] = $ value . '="' . $ value . '"' ; } continue ; } $ text [ ] = $ key . '="' . htmlspecialchars ( $ value ) . '"' ; } return empty ( $ text ) ? '' : ' ' . implode ( ' ' , $ text ) ; } | Create a string of attributes to use in an HTML tag . |
21,122 | public static function addToAttribute ( $ attribute , $ addition ) { $ new = array_unique ( array_merge ( explode ( ' ' , $ attribute ) , explode ( ' ' , $ addition ) ) ) ; $ new = array_filter ( $ new , function ( $ value ) { return $ value !== '' ; } ) ; return implode ( ' ' , $ new ) ; } | Add to the value of an attribute checking for duplicates . This could be used to add css classes when css classes already exist . |
21,123 | public static function addToAttributeArray ( array $ attributes , $ name , $ addition ) { $ attribute = isset ( $ attributes [ $ name ] ) ? $ attributes [ $ name ] : '' ; $ attributes [ $ name ] = self :: addToAttribute ( $ attribute , $ addition ) ; return $ attributes ; } | Add to the value of an attribute in an array of attributes . The attribute will be created if it doesn t exist . |
21,124 | public static function tag ( $ tag , $ content = null , array $ attributes = array ( ) ) { return self :: openTag ( $ tag , $ attributes ) . $ content . self :: closeTag ( $ tag ) ; } | Create an HTML tag . |
21,125 | public static function label ( $ for , $ content = null , array $ attributes = array ( ) ) { $ attributes = array_merge ( array ( 'for' => $ for ) , $ attributes ) ; return self :: tag ( 'label' , $ content , $ attributes ) ; } | Create a label tag . |
21,126 | public function set ( string $ name , callable $ callback ) : void { $ this -> services [ $ name ] = function ( $ c ) use ( $ callback ) { static $ object ; if ( $ object === null ) { $ object = $ callback ( $ c ) ; } return $ object ; } ; } | Defines a shared service |
21,127 | public function get ( $ name ) { if ( ! isset ( $ this -> services [ $ name ] ) ) { throw ServiceNotFoundException :: fromName ( $ name ) ; } return $ this -> services [ $ name ] ( $ this ) ; } | Retrieves a service by name |
21,128 | public function hasParameter ( string $ name ) : bool { return isset ( $ this -> parameters [ $ name ] ) || array_key_exists ( $ name , $ this -> parameters ) ; } | Checks if a parameter exists |
21,129 | public function forward ( $ address , $ countryCode = null ) { $ attempt = 0 ; while ( $ this -> getCurrentGeocoding ( ) && $ attempt <= count ( $ this -> sourceConfig ) ) { if ( $ parsedAddress = $ this -> getCurrentGeocoding ( ) -> forward ( $ address , $ countryCode ) ) { return $ parsedAddress ; } else { $ this -> setCurrentGeocoding ( $ this -> getNextGeocoding ( ) ) ; } $ attempt ++ ; } return null ; } | Forward Geocoding is the process of taking a given location in address format and returning the closes known coordinates to the address provided . The address can be a country county city state zip code street address or any combination of these . |
21,130 | protected function prepare ( ) { if ( is_array ( $ this -> data ) ) { foreach ( $ this -> data as $ key => $ value ) { $ this -> addData ( $ key , $ value ) ; } } Logger :: get ( ) -> debug ( "Response data:\n" . $ this -> dataDocument -> toString ( false ) ) ; $ this -> document = $ this -> dataDocument -> transform ( $ this -> getTemplate ( ) ) ; } | Prepares the document by merging the template and the data . |
21,131 | public function render ( $ template , array $ parameters = array ( ) , Response $ response = null ) { if ( ! $ response instanceof Response ) { $ response = new Response ( ) ; } $ response -> setContent ( $ this -> engine -> render ( $ template , $ parameters ) ) ; return $ response ; } | Render a template with the template engine |
21,132 | public function map ( Router $ router ) { $ router -> group ( [ 'prefix' => config ( 'docit.base_route' ) , 'namespace' => $ this -> namespace ] , function ( $ router ) { require ( realpath ( __DIR__ . '/../Http/routes.php' ) ) ; } ) ; } | Define the routes for Docit . |
21,133 | public static function set ( string $ key , string $ value , bool $ to_file = true , bool $ put = true , bool $ set = true ) { if ( $ to_file ) { self :: toFile ( $ key , $ value ) ; } if ( $ put ) { putenv ( "$key=$value" ) ; } if ( $ set ) { $ _ENV [ $ key ] = $ value ; } } | Replaces the value of the env variable in the . env file |
21,134 | public static function parseFilter2 ( array $ requestFilters , EarthIT_Schema_ResourceClass $ rc , EarthIT_Schema $ schema ) { $ filterComponents = array ( ) ; foreach ( $ requestFilters as $ filter ) { $ filterComponents [ ] = EarthIT_Storage_ItemFilters :: parsePattern ( $ filter [ 'fieldName' ] , $ filter [ 'pattern' ] , $ rc , $ schema , true ) ; } return EarthIT_Storage_ItemFilters :: anded ( $ filterComponents ) ; } | Better than the first one! |
21,135 | public function get ( string $ name ) : ? UploadedFileInterface { if ( ! isset ( $ this -> uploadedFiles [ $ name ] ) ) { return null ; } return $ this -> uploadedFiles [ $ name ] ; } | Returns the uploaded file by name if it exists null otherwise . |
21,136 | public function set ( string $ name , UploadedFileInterface $ uploadedFile ) : void { $ this -> uploadedFiles [ $ name ] = $ uploadedFile ; } | Sets an uploaded file by name . |
21,137 | public function tree ( $ rootId , array $ columns = [ ] ) { $ columns = $ this -> pickColumns ( $ columns ) ; $ columnsId = $ this -> getColumnsCacheId ( $ columns ) ; if ( isset ( $ this -> _hierachyCache [ $ columnsId ] [ $ rootId ] ) ) { return $ this -> _hierachyCache [ $ columnsId ] [ $ rootId ] ; } $ result = $ this -> queryTree ( $ rootId ) -> get ( $ this -> toSelectColumns ( $ columns ) ) ; $ this -> fillNodeCache ( $ columnsId , $ result ) ; return $ this -> _rootNodeCache [ $ columnsId ] [ $ rootId ] ; } | Retrieve a tree by its rootId |
21,138 | public function get ( $ id , $ rootId = NULL , array $ columns = [ ] ) { $ columns = $ this -> pickColumns ( $ columns ) ; $ columnsId = $ this -> getColumnsCacheId ( $ columns ) ; if ( isset ( $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ) ) { return $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ; } if ( $ rootId ) { $ this -> tree ( $ rootId , $ columns ) ; } if ( isset ( $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ) ) { return $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ; } $ result = $ this -> queryTreeById ( $ id ) -> get ( $ this -> toSelectColumns ( $ columns ) ) ; $ this -> fillNodeCache ( $ columnsId , $ result ) ; if ( isset ( $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ) ) { return $ this -> _hierachyCache [ $ columnsId ] [ $ id ] ; } } | Retrieve a tree by its ID |
21,139 | public function getAdapterInstance ( ) { if ( $ this -> adapter instanceof Encrypt \ EncryptionAlgorithmInterface ) { return $ this -> adapter ; } $ adapter = $ this -> adapter ; $ options = $ this -> getOptions ( ) ; if ( ! class_exists ( $ adapter ) ) { $ adapter = __CLASS__ . '\\' . ucfirst ( $ adapter ) ; if ( ! class_exists ( $ adapter ) ) { throw new Exception \ RuntimeException ( sprintf ( '%s unable to load adapter; class "%s" not found' , __METHOD__ , $ this -> adapter ) ) ; } } $ this -> adapter = new $ adapter ( $ options ) ; if ( ! $ this -> adapter instanceof Encrypt \ EncryptionAlgorithmInterface ) { throw new Exception \ InvalidArgumentException ( sprintf ( 'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface' , $ adapter , __CLASS__ ) ) ; } return $ this -> adapter ; } | Returns the adapter instance |
21,140 | public function before_update ( Model $ obj ) { $ relation_changed = false ; foreach ( $ this -> _relations as $ relation ) { if ( $ this -> relation_changed ( $ obj , $ relation ) ) { $ relation_changed = true ; break ; } } $ objClassName = get_class ( $ obj ) ; $ objProperties = $ objClassName :: properties ( ) ; if ( $ obj -> is_changed ( array_keys ( $ objProperties ) ) or $ relation_changed ) { $ obj -> { $ this -> _property } = $ this -> _mysql_timestamp ? \ Date :: time ( ) -> format ( 'mysql' ) : \ Date :: time ( ) -> get_timestamp ( ) ; } } | Set the UpdatedAt property to the current time . |
21,141 | protected function relation_changed ( Model $ obj , $ relation ) { if ( $ obj -> relations ( $ relation ) === false ) { throw new \ InvalidArgumentException ( 'Unknown relation ' . $ relation ) ; } if ( ! $ obj -> is_fetched ( $ relation ) ) { return false ; } $ relation_object = $ obj -> relations ( $ relation ) ; if ( $ relation_object -> is_singular ( ) ) { return $ obj -> { $ relation } -> is_changed ( ) ; } foreach ( $ obj -> { $ relation } as $ related_model ) { if ( $ related_model -> is_changed ( ) ) { return true ; } } return false ; } | Checks to see if any models in the given relation are changed . This function is lazy so will return true as soon as it finds something that has changed . |
21,142 | public function produce ( ) { $ cacheFactory = null ; foreach ( $ this -> cacheFactories as $ factory ) { if ( false === $ factory instanceof CacheFactoryInterface ) { throw new \ InvalidArgumentException ( "Array of Cache Factories must contain valid CacheFactory objects." ) ; } if ( $ this -> type == $ factory -> getType ( ) ) { $ cacheFactory = $ factory ; break ; } } if ( null === $ cacheFactory ) { throw ConfigException :: cacheFactoryNotFound ( $ this -> type ) ; } $ cache = $ cacheFactory -> newInstance ( $ this -> app ) ; if ( false === $ cache instanceof CacheInterface ) { throw new \ InvalidArgumentException ( "Cache factory must produce a valid CacheInterface object." ) ; } return $ cache ; } | Produces a CacheInterface object . |
21,143 | public function setSubPage ( MbPage $ mbPage ) { $ this -> subPages [ $ mbPage -> getSlug ( ) ] = $ mbPage ; $ mbPage -> setParentPage ( $ this ) ; return $ mbPage ; } | Set sub page |
21,144 | public function addSubPage ( $ name , $ slug = null ) { $ subpage = self :: create ( $ name ) -> setSlug ( is_null ( $ slug ) ? $ name : $ slug ) ; $ this -> setSubPage ( $ subpage ) ; return $ subpage ; } | Add sub page |
21,145 | public function getController ( ) { if ( $ this -> controller instanceof MbController ) { return $ this -> controller ; } if ( is_string ( $ this -> controller ) ) { $ this -> controller = MbController :: create ( $ this -> controller ) ; } else { throw new MbException ( "No Controller has been set for the page {$this->getName()}." ) ; } return $ this -> controller ; } | Get page controller |
21,146 | public function addMbAction ( $ actionName , $ action = null ) { $ mbAction = new MbAction ( $ this , $ actionName ) ; $ mbAction -> actionResolver ( $ action ) ; return $ this -> setMbAction ( $ mbAction ) ; } | add new MbAction |
21,147 | public function addMenuWordpress ( ) { if ( $ this -> isHideMenu ( ) ) { add_submenu_page ( null , $ this -> getName ( ) , $ this -> getName ( ) , $ this -> getCapability ( ) , $ this -> getSlug ( ) , [ MocaBonita :: getInstance ( ) , 'sendContent' ] ) ; } elseif ( $ this -> isMainMenu ( ) ) { add_menu_page ( $ this -> getName ( ) , $ this -> getName ( ) , $ this -> getCapability ( ) , $ this -> getSlug ( ) , [ MocaBonita :: getInstance ( ) , 'sendContent' ] , $ this -> getDashicon ( ) , $ this -> getMenuPosition ( ) ) ; } elseif ( $ this -> isSubMenu ( ) ) { add_submenu_page ( $ this -> getParentPage ( ) -> getSlug ( ) , $ this -> getName ( ) , $ this -> getName ( ) , $ this -> getCapability ( ) , $ this -> getSlug ( ) , [ MocaBonita :: getInstance ( ) , 'sendContent' ] ) ; if ( $ this -> getParentPage ( ) -> isRemovePageSubmenu ( ) ) { remove_submenu_page ( $ this -> getParentPage ( ) -> getSlug ( ) , $ this -> getParentPage ( ) -> getSlug ( ) ) ; $ this -> getParentPage ( ) -> setRemovePageSubmenu ( false ) ; } } } | Add Menu in Wordpress |
21,148 | public function getAll ( ) { $ system = array ( ) ; $ system [ 'contact' ] = $ this -> contact ( ) ; $ system [ 'description' ] = $ this -> description ( ) ; $ system [ 'location' ] = $ this -> location ( ) ; $ system [ 'name' ] = $ this -> name ( ) ; $ system [ 'uptime' ] = $ this -> uptime ( ) ; return $ system ; } | Gets all system values as an associate array |
21,149 | protected function createForm ( Framework $ framework , WebRequest $ request , Response $ response ) { $ form = new Form ( 'login' , $ request -> getFullRoute ( 'login' ) , 'post' ) ; $ errorBox = new ErrorBox ( 'login-errors' , 1 ) ; $ form -> addPart ( $ errorBox ) ; $ origin = '' ; if ( $ request -> hasParam ( '_origin' ) ) { $ origin = $ request -> getParam ( '_origin' ) ; } $ helpText = '' ; if ( $ this -> getSetting ( 'accesscontrol.allowRenewPassword' ) ) { $ helpText = $ this -> translate ( 'Lost your password? <a href="%link%">Renew it here.</a>' , '\\Zepi\\Web\\AccessControl' , array ( 'link' => $ request -> getFullRoute ( 'request-new-password' ) ) ) ; } $ group = new Group ( 'user-data' , $ this -> translate ( 'User data' , '\\Zepi\\Web\\AccessControl' ) , array ( new Text ( 'username' , $ this -> translate ( 'Username' , '\\Zepi\\Web\\AccessControl' ) , true ) , new Password ( 'password' , $ this -> translate ( 'Password' , '\\Zepi\\Web\\AccessControl' ) , true , '' , $ helpText ) , new Hidden ( 'origin' , $ origin ) ) , 10 ) ; $ form -> addPart ( $ group ) ; $ buttonGroup = new ButtonGroup ( 'buttons' , array ( new Submit ( 'submit' , $ this -> translate ( 'Login' , '\\Zepi\\Web\\AccessControl' ) ) ) , 100 ) ; $ form -> addPart ( $ buttonGroup ) ; return $ form ; } | Returns the Form object for the login form |
21,150 | public function filterByHistory ( $ history = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ history ) ) { $ comparison = Criteria :: IN ; } elseif ( preg_match ( '/[\%\*]/' , $ history ) ) { $ history = str_replace ( '*' , '%' , $ history ) ; $ comparison = Criteria :: LIKE ; } } return $ this -> addUsingAlias ( SkillTableMap :: COL_HISTORY , $ history , $ comparison ) ; } | Filter the query on the history column |
21,151 | public function filterByMovementDescription ( $ movementDescription = null , $ comparison = null ) { if ( null === $ comparison ) { if ( is_array ( $ movementDescription ) ) { $ comparison = Criteria :: IN ; } elseif ( preg_match ( '/[\%\*]/' , $ movementDescription ) ) { $ movementDescription = str_replace ( '*' , '%' , $ movementDescription ) ; $ comparison = Criteria :: LIKE ; } } return $ this -> addUsingAlias ( SkillTableMap :: COL_MOVEMENT_DESCRIPTION , $ movementDescription , $ comparison ) ; } | Filter the query on the movement_description column |
21,152 | public function filterByMultiplier ( $ multiplier = null , $ comparison = null ) { if ( is_array ( $ multiplier ) ) { $ useMinMax = false ; if ( isset ( $ multiplier [ 'min' ] ) ) { $ this -> addUsingAlias ( SkillTableMap :: COL_MULTIPLIER , $ multiplier [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } if ( isset ( $ multiplier [ 'max' ] ) ) { $ this -> addUsingAlias ( SkillTableMap :: COL_MULTIPLIER , $ multiplier [ 'max' ] , Criteria :: LESS_EQUAL ) ; $ useMinMax = true ; } if ( $ useMinMax ) { return $ this ; } if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( SkillTableMap :: COL_MULTIPLIER , $ multiplier , $ comparison ) ; } | Filter the query on the multiplier column |
21,153 | public function filterByObjectId ( $ objectId = null , $ comparison = null ) { if ( is_array ( $ objectId ) ) { $ useMinMax = false ; if ( isset ( $ objectId [ 'min' ] ) ) { $ this -> addUsingAlias ( SkillTableMap :: COL_OBJECT_ID , $ objectId [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } if ( isset ( $ objectId [ 'max' ] ) ) { $ this -> addUsingAlias ( SkillTableMap :: COL_OBJECT_ID , $ objectId [ 'max' ] , Criteria :: LESS_EQUAL ) ; $ useMinMax = true ; } if ( $ useMinMax ) { return $ this ; } if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( SkillTableMap :: COL_OBJECT_ID , $ objectId , $ comparison ) ; } | Filter the query on the object_id column |
21,154 | public function filterBySport ( $ sport , $ comparison = null ) { if ( $ sport instanceof \ gossi \ trixionary \ model \ Sport ) { return $ this -> addUsingAlias ( SkillTableMap :: COL_SPORT_ID , $ sport -> getId ( ) , $ comparison ) ; } elseif ( $ sport instanceof ObjectCollection ) { if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } return $ this -> addUsingAlias ( SkillTableMap :: COL_SPORT_ID , $ sport -> toKeyValue ( 'PrimaryKey' , 'Id' ) , $ comparison ) ; } else { throw new PropelException ( 'filterBySport() only accepts arguments of type \gossi\trixionary\model\Sport or Collection' ) ; } } | Filter the query by a related \ gossi \ trixionary \ model \ Sport object |
21,155 | public function useVariationOfQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinVariationOf ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'VariationOf' , '\gossi\trixionary\model\SkillQuery' ) ; } | Use the VariationOf relation Skill object |
21,156 | public function useMultipleOfQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinMultipleOf ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'MultipleOf' , '\gossi\trixionary\model\SkillQuery' ) ; } | Use the MultipleOf relation Skill object |
21,157 | public function useStartPositionQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinStartPosition ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'StartPosition' , '\gossi\trixionary\model\PositionQuery' ) ; } | Use the StartPosition relation Position object |
21,158 | public function useEndPositionQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinEndPosition ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'EndPosition' , '\gossi\trixionary\model\PositionQuery' ) ; } | Use the EndPosition relation Position object |
21,159 | public function useFeaturedPictureQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinFeaturedPicture ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'FeaturedPicture' , '\gossi\trixionary\model\PictureQuery' ) ; } | Use the FeaturedPicture relation Picture object |
21,160 | public function useFeaturedVideoQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinFeaturedVideo ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'FeaturedVideo' , '\gossi\trixionary\model\VideoQuery' ) ; } | Use the FeaturedVideo relation Video object |
21,161 | public function useFeaturedTutorialQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinFeaturedTutorial ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'FeaturedTutorial' , '\gossi\trixionary\model\VideoQuery' ) ; } | Use the FeaturedTutorial relation Video object |
21,162 | public function useKstrukturRootQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinKstrukturRoot ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'KstrukturRoot' , '\gossi\trixionary\model\KstrukturQuery' ) ; } | Use the KstrukturRoot relation Kstruktur object |
21,163 | public function useFunctionPhaseRootQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinFunctionPhaseRoot ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'FunctionPhaseRoot' , '\gossi\trixionary\model\FunctionPhaseQuery' ) ; } | Use the FunctionPhaseRoot relation FunctionPhase object |
21,164 | public function useVariationQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinVariation ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Variation' , '\gossi\trixionary\model\SkillQuery' ) ; } | Use the Variation relation Skill object |
21,165 | public function useMultipleQuery ( $ relationAlias = null , $ joinType = Criteria :: LEFT_JOIN ) { return $ this -> joinMultiple ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Multiple' , '\gossi\trixionary\model\SkillQuery' ) ; } | Use the Multiple relation Skill object |
21,166 | public function useLineageRelatedBySkillIdQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinLineageRelatedBySkillId ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'LineageRelatedBySkillId' , '\gossi\trixionary\model\LineageQuery' ) ; } | Use the LineageRelatedBySkillId relation Lineage object |
21,167 | public function useLineageRelatedByAncestorIdQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinLineageRelatedByAncestorId ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'LineageRelatedByAncestorId' , '\gossi\trixionary\model\LineageQuery' ) ; } | Use the LineageRelatedByAncestorId relation Lineage object |
21,168 | public function useChildQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinChild ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Child' , '\gossi\trixionary\model\SkillDependencyQuery' ) ; } | Use the Child relation SkillDependency object |
21,169 | public function useParentQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinParent ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Parent' , '\gossi\trixionary\model\SkillDependencyQuery' ) ; } | Use the Parent relation SkillDependency object |
21,170 | public function usePartQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinPart ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Part' , '\gossi\trixionary\model\SkillPartQuery' ) ; } | Use the Part relation SkillPart object |
21,171 | public function useCompositeQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinComposite ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Composite' , '\gossi\trixionary\model\SkillPartQuery' ) ; } | Use the Composite relation SkillPart object |
21,172 | public function filterBySkillGroup ( $ skillGroup , $ comparison = null ) { if ( $ skillGroup instanceof \ gossi \ trixionary \ model \ SkillGroup ) { return $ this -> addUsingAlias ( SkillTableMap :: COL_ID , $ skillGroup -> getSkillId ( ) , $ comparison ) ; } elseif ( $ skillGroup instanceof ObjectCollection ) { return $ this -> useSkillGroupQuery ( ) -> filterByPrimaryKeys ( $ skillGroup -> getPrimaryKeys ( ) ) -> endUse ( ) ; } else { throw new PropelException ( 'filterBySkillGroup() only accepts arguments of type \gossi\trixionary\model\SkillGroup or Collection' ) ; } } | Filter the query by a related \ gossi \ trixionary \ model \ SkillGroup object |
21,173 | public function usePictureQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinPicture ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Picture' , '\gossi\trixionary\model\PictureQuery' ) ; } | Use the Picture relation Picture object |
21,174 | public function useVideoQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinVideo ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'Video' , '\gossi\trixionary\model\VideoQuery' ) ; } | Use the Video relation Video object |
21,175 | public function filterBySkillReference ( $ skillReference , $ comparison = null ) { if ( $ skillReference instanceof \ gossi \ trixionary \ model \ SkillReference ) { return $ this -> addUsingAlias ( SkillTableMap :: COL_ID , $ skillReference -> getSkillId ( ) , $ comparison ) ; } elseif ( $ skillReference instanceof ObjectCollection ) { return $ this -> useSkillReferenceQuery ( ) -> filterByPrimaryKeys ( $ skillReference -> getPrimaryKeys ( ) ) -> endUse ( ) ; } else { throw new PropelException ( 'filterBySkillReference() only accepts arguments of type \gossi\trixionary\model\SkillReference or Collection' ) ; } } | Filter the query by a related \ gossi \ trixionary \ model \ SkillReference object |
21,176 | public function useKstrukturRelatedBySkillIdQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinKstrukturRelatedBySkillId ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'KstrukturRelatedBySkillId' , '\gossi\trixionary\model\KstrukturQuery' ) ; } | Use the KstrukturRelatedBySkillId relation Kstruktur object |
21,177 | public function useFunctionPhaseRelatedBySkillIdQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinFunctionPhaseRelatedBySkillId ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'FunctionPhaseRelatedBySkillId' , '\gossi\trixionary\model\FunctionPhaseQuery' ) ; } | Use the FunctionPhaseRelatedBySkillId relation FunctionPhase object |
21,178 | public function filterBySkillVersion ( $ skillVersion , $ comparison = null ) { if ( $ skillVersion instanceof \ gossi \ trixionary \ model \ SkillVersion ) { return $ this -> addUsingAlias ( SkillTableMap :: COL_ID , $ skillVersion -> getId ( ) , $ comparison ) ; } elseif ( $ skillVersion instanceof ObjectCollection ) { return $ this -> useSkillVersionQuery ( ) -> filterByPrimaryKeys ( $ skillVersion -> getPrimaryKeys ( ) ) -> endUse ( ) ; } else { throw new PropelException ( 'filterBySkillVersion() only accepts arguments of type \gossi\trixionary\model\SkillVersion or Collection' ) ; } } | Filter the query by a related \ gossi \ trixionary \ model \ SkillVersion object |
21,179 | public function useSkillVersionQuery ( $ relationAlias = null , $ joinType = Criteria :: INNER_JOIN ) { return $ this -> joinSkillVersion ( $ relationAlias , $ joinType ) -> useQuery ( $ relationAlias ? $ relationAlias : 'SkillVersion' , '\gossi\trixionary\model\SkillVersionQuery' ) ; } | Use the SkillVersion relation SkillVersion object |
21,180 | public function filterByGroup ( $ group , $ comparison = Criteria :: EQUAL ) { return $ this -> useSkillGroupQuery ( ) -> filterByGroup ( $ group , $ comparison ) -> endUse ( ) ; } | Filter the query by a related Group object using the kk_trixionary_skill_group table as cross reference |
21,181 | public function filterByReference ( $ reference , $ comparison = Criteria :: EQUAL ) { return $ this -> useSkillReferenceQuery ( ) -> filterByReference ( $ reference , $ comparison ) -> endUse ( ) ; } | Filter the query by a related Reference object using the kk_trixionary_skill_reference table as cross reference |
21,182 | protected function findRelatedObjectSkillCounts ( $ con ) { $ criteria = clone $ this ; if ( $ this -> useAliasInSQL ) { $ alias = $ this -> getModelAlias ( ) ; $ criteria -> removeAlias ( $ alias ) ; } else { $ alias = '' ; } $ this -> objectSkillCounts = \ gossi \ trixionary \ model \ ObjectQuery :: create ( ) -> joinSkill ( $ alias ) -> mergeWith ( $ criteria ) -> find ( $ con ) ; } | Finds the related Object objects and keep them for later |
21,183 | public function run ( $ queue ) { $ configuration = $ this -> getConfiguration ( $ queue ) ; if ( null === $ configuration ) { return ; } try { $ job = $ this -> getJob ( $ configuration ) ; $ configuration -> increaseOrderNr ( ) ; $ this -> saveJobState ( $ configuration , JobState :: STATE_RUNNING ) ; $ report = $ this -> reportManager -> create ( $ configuration ) ; $ state = $ job -> run ( $ report ) ; if ( JobState :: STATE_FINISHED === $ state ) { $ configuration -> setNextStart ( new \ DateTime ( '+' . $ configuration -> getPeriod ( ) . ' seconds' ) ) ; $ report -> setSuccessful ( true ) ; } $ report -> setEndedAt ( ) ; $ this -> saveJobState ( $ configuration , $ state ) ; } catch ( JobFactoryException $ e ) { $ this -> saveJobState ( $ configuration , JobState :: STATE_FAILED ) ; } } | Run job queue . |
21,184 | private function saveJobState ( JobConfigurationInterface $ configuration , $ state ) { $ configuration -> setState ( $ state ) ; $ this -> configurationManager -> add ( $ configuration , true ) ; $ this -> eventDispatcher -> dispatch ( JobQueueEvents :: CHANGE_JOB_STATE , new JobEvent ( $ configuration ) ) ; } | Save job state . |
21,185 | public function checkPayment ( $ transaction_id ) { if ( null === $ transaction_id || ! is_string ( $ transaction_id ) || strlen ( trim ( $ transaction_id ) ) == 0 ) { throw new \ InvalidArgumentException ( 'Transaction ID should be a string.' ) ; } $ params = array ( 'partnerid' => $ this -> partnerId , 'transaction_id' => $ transaction_id , ) ; $ response = $ this -> request ( 'check-status/' , $ params ) ; if ( $ response -> order === null ) { throw new MollieException ( 'Unexpected response' ) ; } $ transactionId = ( string ) $ response -> order -> transaction_id ; $ amount = ( int ) $ response -> order -> amount ; $ paid = ( ( string ) $ response -> order -> paid == 'true' ) ; $ status = ( string ) $ response -> order -> status ; return new TransactionStatus ( $ amount , $ paid , $ transactionId , $ status ) ; } | Check the state of a transaction |
21,186 | public function preparePayment ( $ amount , $ report_url , $ return_url , $ customer_ref , array $ options = null ) { if ( ! filter_var ( $ amount , FILTER_VALIDATE_INT ) || $ amount < 100 ) { throw new \ InvalidArgumentException ( 'Amount should be in eurocents and at least 100 cents.' ) ; } if ( ! filter_var ( $ report_url , FILTER_VALIDATE_URL ) ) { throw new \ InvalidArgumentException ( 'Report URL should be a valid URL.' ) ; } if ( ! filter_var ( $ return_url , FILTER_VALIDATE_URL ) ) { throw new \ InvalidArgumentException ( 'Return URL should be a valid URL.' ) ; } if ( $ report_url == $ return_url ) { throw new \ InvalidArgumentException ( 'Report URL and Return URL should not be the same.' ) ; } if ( preg_match ( '/[A-Z\s]/' , $ customer_ref ) > 0 ) { throw new \ InvalidArgumentException ( 'Customer reference (description) may not contain any capital letters or whitespace.' ) ; } $ params = array ( 'partnerid' => $ this -> partnerId , 'amount' => $ amount , 'customer_ref' => $ customer_ref , 'reporturl' => $ report_url , 'returnurl' => $ return_url , ) ; if ( $ this -> profileKey != null ) { $ params [ 'profile_key' ] = $ this -> profileKey ; } $ response = $ this -> request ( 'prepare/' , $ params ) ; if ( $ response -> order === null ) { throw new MollieException ( 'Unexpected response' ) ; } $ transactionId = ( string ) $ response -> order -> transaction_id ; $ amount = ( int ) $ response -> order -> amount ; $ destination = ( string ) $ response -> order -> URL ; return new ProviderResponse ( $ transactionId , $ amount , $ destination ) ; } | Request a new payment |
21,187 | public function createNewRecord ( $ data ) { $ people_email = new $ this -> model ; $ people_email [ 'people_id' ] = $ data [ 'people_id' ] ; $ people_email [ 'email_id' ] = $ data [ 'email_id' ] ; if ( $ people_email -> save ( ) ) { return $ people_email -> id ; } return false ; } | INSERT INTO people_email |
21,188 | public static function isCached ( $ identifier , $ accessor ) { return array_key_exists ( $ identifier , self :: $ cache ) && array_key_exists ( $ accessor , self :: $ cache [ $ identifier ] ) ; } | Check if the cache has stored a value for the given identifier and accessor . |
21,189 | public static function addToCache ( $ identifier , $ accessor , array $ data ) { if ( self :: isCached ( $ identifier , $ accessor ) ) { throw new \ Exception ( "Data for identifier '$identifier' and accessor '$accessor' is already present in this cache" ) ; } if ( ! in_array ( $ identifier , self :: $ cache ) ) { self :: $ cache [ $ identifier ] = [ ] ; } self :: $ cache [ $ identifier ] [ $ accessor ] = $ data ; } | Add new data to the cache . |
21,190 | public static function getCached ( $ identifier , $ accessor ) { if ( ! self :: isCached ( $ identifier , $ accessor ) ) { return false ; } return self :: $ cache [ $ identifier ] [ $ accessor ] ; } | Access a given data set of this cache . |
21,191 | public static function isDate ( $ input = false , $ format = 'Y-m-d H:i:s' ) { if ( $ input && Date :: isDate ( $ input ) ) { return true ; } return false ; } | Check if input is a valid date . |
21,192 | public static function isMac ( $ input = false ) { if ( $ input && ! filter_var ( $ input , FILTER_VALIDATE_MAC ) === false ) { return true ; } return false ; } | Check if given input is a valid MAC address . |
21,193 | public static function isEmail ( $ input = false ) { if ( $ input && ! filter_var ( $ input , FILTER_VALIDATE_EMAIL ) === false ) { return true ; } return false ; } | Check if given input is a valid e - mail address . |
21,194 | public static function isIp ( $ input = false ) { if ( $ input && ! filter_var ( $ input , FILTER_VALIDATE_IP ) === false ) { return true ; } return false ; } | Check if given input is a valid IP address . |
21,195 | public static function isLength ( $ string = false , $ minLength = 0 , $ maxLength = false ) { if ( $ string && strlen ( $ string ) >= $ minLength ) { if ( ! $ maxLength || strlen ( $ string ) <= $ maxLength ) { return true ; } } return false ; } | Check the length of a string . |
21,196 | public static function isType ( $ input = false , $ type = false ) { if ( $ input && $ type && Data :: type ( $ input ) == $ type ) { return true ; } return false ; } | Check if given input is of given type . |
21,197 | public static function isUrl ( $ input = false ) { if ( $ input && ! filter_var ( $ input , FILTER_VALIDATE_URL ) === false ) { return true ; } return false ; } | Check if given input is a valid URL . |
21,198 | public static function isZip ( $ input = false ) { if ( $ input ) { if ( File :: isFile ( $ input ) && File :: extension ( $ input ) === 'zip' ) { return true ; } } return false ; } | Check if given input is a ZIP file . |
21,199 | public function add ( $ latitude , $ longitude ) { $ this -> latitude += $ latitude ; $ this -> longitude += $ longitude ; return $ this ; } | Increase the latitude and longitude of the Location . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.