idx int64 0 60.3k | question stringlengths 99 4.85k | target stringlengths 5 718 |
|---|---|---|
9,800 | public function startElement ( $ parser , $ name , $ attrs ) { $ this -> blockBegin ( $ name , $ attrs ) ; switch ( $ name ) { case 'LI' : $ this -> appendBlockText ( '* ' ) ; break ; } } | Function called on the start of an element . |
9,801 | private function blockBegin ( $ name , $ attributes ) { $ this -> transformedTextStack -> push ( '' ) ; $ this -> blockTypeStack -> push ( $ name ) ; $ this -> blockAttributesStack -> push ( $ attributes ) ; } | Called when we begin a block . |
9,802 | public function endElement ( $ parser , $ name ) { switch ( $ name ) { case 'P' : $ this -> appendBlockText ( "\n\n" ) ; break ; case 'UL' : $ this -> appendBlockText ( "\n\n" ) ; break ; case 'LI' : $ this -> appendBlockText ( "\n" ) ; break ; case 'DIV' : $ this -> appendBlockText ( "\n\n\n" ) ; break ; case 'A' : $ ... | When we reach a closing element do something . |
9,803 | private function blockFinished ( ) { $ transformedText = $ this -> transformedTextStack -> pop ( ) ; $ this -> blockTypeStack -> pop ( ) ; $ this -> blockAttributesStack -> pop ( ) ; return $ transformedText ; } | Get the transformed text off the stack and clear down the other stacks . |
9,804 | public function getText ( ) { $ text = trim ( $ this -> text ) ; $ lines = explode ( "\n" , $ text ) ; return implode ( "\n" , array_map ( 'trim' , $ lines ) ) ; } | This gets the text that has been parsed and returns it . |
9,805 | public function update ( array $ data ) { $ webhook = Basecamp :: webhooks ( $ this -> bucket -> id ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ webhook ) ; return $ webhook ; } | Update the webhook . |
9,806 | public function index ( $ page = null , $ status = null ) { $ url = sprintf ( 'buckets/%d/todosets/%d/todolists.json' , $ this -> bucket , $ this -> parent ) ; $ todolists = $ this -> client -> get ( $ url , [ 'query' => [ 'status' => $ status , 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ todolists ... | Index all to - do lists . |
9,807 | public function show ( $ id ) { $ todolist = $ this -> client -> get ( sprintf ( 'buckets/%d/todolists/%d.json' , $ this -> bucket , $ id ) ) ; return new TodoList ( $ this -> response ( $ todolist ) ) ; } | Get a to - do list . |
9,808 | public function store ( array $ data ) { $ todolist = $ this -> client -> post ( sprintf ( 'buckets/%d/todosets/%d/todolists.json' , $ this -> bucket , $ this -> parent ) , [ 'json' => $ data , ] ) ; return new TodoList ( $ this -> response ( $ todolist ) ) ; } | Store a to - do list . |
9,809 | public function update ( $ id , array $ data ) { $ todolist = $ this -> client -> put ( sprintf ( 'buckets/%d/todolists/%d.json' , $ this -> bucket , $ id ) , [ 'json' => $ data , ] ) ; return new TodoList ( $ this -> response ( $ todolist ) ) ; } | Update a to - do list . |
9,810 | public static function set ( callable $ onError = null ) { $ previous = self :: $ callback ; self :: $ callback = $ onError ; return $ previous ; } | Set a new handler that will be notified on uncaught errors during promise resolution callback invocations . |
9,811 | public static function notify ( $ error ) { if ( ! $ error instanceof \ Exception && ! $ error instanceof \ Throwable ) { $ error = new \ Exception ( \ sprintf ( "Promise implementation called %s() with an invalid argument of type '%s'" , __METHOD__ , \ is_object ( $ error ) ? \ get_class ( $ error ) : \ gettype ( $ er... | Notifies the registered handler that an exception occurred . |
9,812 | public function index ( $ page = null , $ status = null ) { $ url = sprintf ( 'buckets/%d/todolists/%d/todos.json' , $ this -> bucket , $ this -> parent ) ; $ todos = $ this -> client -> get ( $ url , [ 'query' => [ 'status' => $ status , 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ todos , Todo :: c... | Index all the to - dos . |
9,813 | public function show ( $ id ) { $ todo = $ this -> client -> get ( sprintf ( 'buckets/%d/todos/%d.json' , $ this -> bucket , $ id ) ) ; return new Todo ( $ this -> response ( $ todo ) ) ; } | Get a to - do . |
9,814 | public function store ( array $ data ) { $ todo = $ this -> client -> post ( sprintf ( 'buckets/%d/todolists/%d/todos.json' , $ this -> bucket , $ this -> parent ) , [ 'json' => $ data , ] ) ; return new Todo ( $ this -> response ( $ todo ) ) ; } | Store a to - do . |
9,815 | public function update ( $ id , array $ data ) { $ todo = $ this -> client -> put ( sprintf ( 'buckets/%d/todos/%d.json' , $ this -> bucket , $ id ) , [ 'json' => $ data , ] ) ; return new Todo ( $ this -> response ( $ todo ) ) ; } | Update a to - do . |
9,816 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/recordings/%d/events.json' , $ this -> bucket , $ this -> parent ) ; $ events = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ events , Event :: class ) ; } | Index all events . |
9,817 | public function sendRequest ( $ action , $ data = null , $ method = RequestInterface :: POST ) { $ this -> httpClient -> getEventDispatcher ( ) -> addListener ( 'request.error' , function ( $ event ) { if ( $ event [ 'response' ] -> isClientError ( ) ) { $ event -> stopPropagation ( ) ; } } ) ; return $ this -> httpCli... | Send a request to the gateway . |
9,818 | public function jquery__get_rule_definition ( ) { $ keys = $ this -> match_keys ? array_keys ( $ this -> array ) : array_values ( $ this -> array ) ; $ array = array_fill_keys ( $ keys , 1 ) ; return array ( 'php_inarray' => $ array , ) ; } | jQuery Validation rule definition |
9,819 | public function setCustomHeaders ( array $ headers ) { foreach ( $ headers as $ k => & $ v ) { if ( strpos ( $ v , ':' ) === false ) { $ v = $ k . ': ' . $ v ; } } $ this -> headers = $ headers ; } | Set custom HTTP headers . |
9,820 | public function blameable ( $ fields = array ( 'created' , 'updated' , 'deleted' ) , $ nullable = false ) { if ( in_array ( 'created' , $ fields ) ) { $ this -> createdBy ( $ nullable ) ; } if ( in_array ( 'updated' , $ fields ) ) { $ this -> updatedBy ( $ nullable ) ; } if ( in_array ( 'deleted' , $ fields ) ) { $ thi... | Single method to configure all blameable fields in the table |
9,821 | public function createdBy ( $ nullable = false ) { $ columnName = Config :: get ( 'culpa.default_fields.created' ) ; if ( ! $ columnName ) { throw new \ Exception ( 'No column for the created field is configured, did you publish the Culpa config?' ) ; } $ field = $ this -> integer ( $ columnName ) -> unsigned ( ) ; if ... | Add the blameable creator field |
9,822 | protected function addCulpaForeign ( $ columnName ) { $ foreignTable = Config :: get ( 'culpa.users.table' ) ; if ( $ foreignTable ) { $ this -> foreign ( $ columnName ) -> references ( 'id' ) -> on ( $ foreignTable ) ; } } | Add a foreign key constraint to the users table |
9,823 | public function indexResponse ( $ response , $ class ) { $ resources = $ this -> response ( $ response ) ; $ collection = ( new IndexCollection ( $ resources ) ) -> map ( function ( $ resource ) use ( $ class ) { return new $ class ( $ resource ) ; } ) ; $ link = $ response -> getHeader ( 'Link' ) [ 0 ] ?? null ; $ tot... | Return an index response with pagination . |
9,824 | protected function getPageNumber ( $ link ) { if ( $ link ) { $ url = str_replace ( 'rel="next"' , '' , preg_replace ( '/[<>;\ ]/' , '' , $ link ) ) ; parse_str ( parse_url ( $ url , PHP_URL_QUERY ) , $ output ) ; return ( int ) $ output [ 'page' ] ; } return null ; } | Format the link request header . |
9,825 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/questionnaires/%d/questions.json' , $ this -> bucket , $ this -> parent ) ; $ questions = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ questions , Question :: class ) ; } | Index all the questions . |
9,826 | public function show ( $ id ) { $ question = $ this -> client -> get ( sprintf ( 'buckets/%d/questions/%d.json' , $ this -> bucket , $ id ) ) ; return new Question ( $ this -> response ( $ question ) ) ; } | Get a question . |
9,827 | public function index ( $ type , array $ parameters = array ( ) , $ page = null ) { $ url = 'projects/recordings.json' ; $ recordings = $ this -> client -> get ( $ url , [ 'query' => array_merge ( [ 'type' => $ type , 'page' => $ page , ] , $ parameters ) ] ) ; return $ this -> indexResponse ( $ recordings , Recording ... | Index all recordings . |
9,828 | public function close ( ) { $ this -> ending = true ; foreach ( $ this -> pending as $ deferred ) { $ deferred -> reject ( new RuntimeException ( 'Shell is ending' ) ) ; } $ this -> pending = array ( ) ; $ this -> buffer = '' ; $ this -> stream -> removeListener ( 'data' , array ( $ this , 'handleData' ) ) ; $ this -> ... | hard - close the shell now and reject all pending commands |
9,829 | public function update ( array $ data ) { $ chatbot = Basecamp :: chatbots ( $ this -> bucket -> id , $ this -> campfire -> id ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ chatbot ) ; return $ chatbot ; } | Update the chatbot . |
9,830 | public function destroy ( ) { return Basecamp :: chatbots ( $ this -> bucket -> id , $ this -> campfire -> id ) -> destroy ( $ this -> id ) ; } | Delete the chatbot . |
9,831 | public function campfire ( ) { $ campfire = collect ( $ this -> dock ) -> where ( 'name' , 'chat' ) -> first ( ) ; $ campfire -> bucket = $ this ; return new Campfire ( $ campfire ) ; } | Get the project campfire . |
9,832 | public function messageBoard ( ) { $ messageBoard = collect ( $ this -> dock ) -> where ( 'name' , 'message_board' ) -> first ( ) ; $ messageBoard -> bucket = $ this ; return new MessageBoard ( $ messageBoard ) ; } | Get the project message board . |
9,833 | public function todoSet ( ) { $ todos = collect ( $ this -> dock ) -> where ( 'name' , 'todoset' ) -> first ( ) ; $ todos -> bucket = $ this ; return new TodoSet ( $ todos ) ; } | Get the project todos . |
9,834 | public function schedule ( ) { $ schedule = collect ( $ this -> dock ) -> where ( 'name' , 'schedule' ) -> first ( ) ; $ schedule -> bucket = $ this ; return new Schedule ( $ schedule ) ; } | Get the project schedule . |
9,835 | public function questionnaire ( ) { $ questionnaire = collect ( $ this -> dock ) -> where ( 'name' , 'questionnaire' ) -> first ( ) ; $ questionnaire -> bucket = $ this ; return new Questionnaire ( $ questionnaire ) ; } | Get the project automatic check - ins . |
9,836 | public function update ( array $ data ) { $ project = Basecamp :: projects ( ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ project ) ; return $ project ; } | Update the project . |
9,837 | protected function displayAssets ( array $ aAssetFiles ) { $ oOptions = $ this -> getOptions ( ) ; $ iLastModifiedTime = $ oOptions -> isProduction ( ) ? $ oOptions -> getLastModifiedTime ( ) : null ; $ aRendererPlugins = array ( ) ; foreach ( $ aAssetFiles as $ oAssetFile ) { if ( ! ( $ oAssetFile instanceof \ AssetsB... | Display assets through renderer |
9,838 | public function consoleError ( \ Zend \ Mvc \ MvcEvent $ oEvent ) { if ( ( $ oRequest = $ oEvent -> getRequest ( ) ) instanceof \ Zend \ Console \ Request && $ oRequest -> getParam ( 'controller' ) === 'AssetsBundle\Controller\Tools' ) { $ oConsole = $ oEvent -> getApplication ( ) -> getServiceManager ( ) -> get ( 'con... | Display errors to the console if an error appends during a ToolsController action |
9,839 | public function update ( array $ data ) { $ upload = Basecamp :: uploads ( $ this -> bucket -> id ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ upload ) ; return $ upload ; } | Update the upload . |
9,840 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/client/correspondences.json' , $ this -> bucket ) ; $ correspondences = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ correspondences , ClientCorrespondence :: class ) ; } | Index all correspondences . |
9,841 | public function show ( $ id ) { $ correspondence = $ this -> client -> get ( sprintf ( 'buckets/%d/client/correspondences/%d.json' , $ this -> bucket , $ id ) ) ; return new ClientCorrespondence ( $ this -> response ( $ correspondence ) ) ; } | Get a client correspondence . |
9,842 | public function update ( array $ data ) { $ template = Basecamp :: templates ( ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ template ) ; return $ template ; } | Update the template . |
9,843 | public function execute ( $ command , $ edition = null ) { $ migrationPaths = $ this -> getMigrationPaths ( $ edition ) ; foreach ( $ migrationPaths as $ migrationEdition => $ migrationPath ) { $ doctrineApplication = $ this -> doctrineApplicationBuilder -> build ( ) ; $ input = $ this -> formDoctrineInput ( $ command ... | Execute Doctrine Migration command for all needed Shop edition and project . If Doctrine returns an error code breaks and return it . |
9,844 | private function formDoctrineInput ( $ command , $ migrationPath , $ dbFilePath ) { $ input = new ArrayInput ( [ '--configuration' => $ migrationPath , '--db-configuration' => $ dbFilePath , '-n' => true , 'command' => $ command ] ) ; return $ input ; } | Form input which is expected by Doctrine . |
9,845 | private function getMigrationPaths ( $ edition = null ) { $ allMigrationPaths = $ this -> facts -> getMigrationPaths ( ) ; if ( is_null ( $ edition ) ) { return $ allMigrationPaths ; } $ migrationPaths = [ ] ; foreach ( $ allMigrationPaths as $ migrationEdition => $ migrationPath ) { if ( strtolower ( $ migrationEditio... | Filters out only needed migrations . |
9,846 | protected function getAssetFilesPathFromDirectory ( $ sDirPath , $ sAssetType ) { if ( ! is_string ( $ sDirPath ) || ! ( $ sDirPath = $ this -> getOptions ( ) -> getRealPath ( $ sDirPath ) ) && ! is_dir ( $ sDirPath ) ) { throw new \ InvalidArgumentException ( 'Directory not found : ' . $ sDirPath ) ; } if ( ! \ Assets... | Retrieve assets from a directory |
9,847 | public function getAssetRelativePath ( $ sAssetPath ) { if ( ! ( $ sAssetRealPath = $ this -> getOptions ( ) -> getRealPath ( $ sAssetPath ) ) ) { throw new \ InvalidArgumentException ( 'File "' . $ sAssetPath . '" does not exist' ) ; } $ sCachePath = $ this -> getOptions ( ) -> getCachePath ( ) ; return strpos ( $ sAs... | Retrieve asset relative path |
9,848 | public function assetsConfigurationHasChanged ( array $ aAssetsType = null ) { $ aAssetsType = $ aAssetsType ? array_unique ( $ aAssetsType ) : array ( \ AssetsBundle \ AssetFile \ AssetFile :: ASSET_CSS , \ AssetsBundle \ AssetFile \ AssetFile :: ASSET_LESS , \ AssetsBundle \ AssetFile \ AssetFile :: ASSET_JS , \ Asse... | Check if assets configuration is the same as last saved configuration |
9,849 | public function saveAssetFilesConfiguration ( ) { $ sConfigurationFilePath = $ this -> getConfigurationFilePath ( ) ; $ bFileExists = file_exists ( $ sConfigurationFilePath ) ; if ( ! ( $ bFileExists = file_exists ( $ sConfigurationFilePath ) ) && ! is_dir ( $ sConfigurationFileDirPath = dirname ( $ sConfigurationFileP... | Save current asset configuration into conf file |
9,850 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/client/recordings/%d/replies.json' , $ this -> bucket , $ this -> parent ) ; $ replies = $ this -> client -> get ( $ url , [ 'page' => $ page , ] ) ; return $ this -> indexResponse ( $ replies , ClientReply :: class ) ; } | Index all client replies . |
9,851 | public function show ( $ id ) { $ reply = $ this -> client -> get ( sprintf ( 'buckets/%d/client/recordings/%d/replies/%d.json' , $ this -> bucket , $ this -> parent , $ id ) ) ; return new ClientReply ( $ this -> response ( $ reply ) ) ; } | Get a client reply . |
9,852 | public function validatePlugin ( $ oAssetFileFilter ) { if ( $ oAssetFileFilter instanceof \ AssetsBundle \ AssetFile \ AssetFileFilter \ AssetFileFilterInterface ) { return ; } throw new \ RuntimeException ( sprintf ( 'Assets Filter expects an instance of \AssetsBundle\AssetFile\AssetFileFilter\AssetFileFilterInterfac... | Validate the plugin . Checks that the filter loaded is an instance of \ AssetsBundle \ AssetFile \ AssetFileFilter \ AssetFileFilterInterface |
9,853 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/vaults/%d/uploads.json' , $ this -> bucket , $ this -> parent ) ; $ uploads = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> response ( $ uploads , Upload :: class ) ; } | Index all the uploads . |
9,854 | public function show ( $ id ) { $ upload = $ this -> client -> get ( sprintf ( 'buckets/%d/uploads/%d.json' , $ this -> bucket , $ id ) ) ; return new Upload ( $ this -> response ( $ upload ) ) ; } | Get an upload . |
9,855 | public function store ( array $ data ) { $ upload = $ this -> client -> post ( sprintf ( 'buckets/%d/vaults/%d/uploads.json' , $ this -> bucket , $ this -> parent ) , [ 'json' => $ data , ] ) ; return new Upload ( $ this -> response ( $ upload ) ) ; } | Store an upload . |
9,856 | public function update ( $ id , array $ data ) { $ upload = $ this -> client -> put ( sprintf ( 'buckets/%d/uploads/%d.json' , $ this -> bucket , $ id ) , [ 'json' => $ data , ] ) ; return new Upload ( $ this -> response ( $ upload ) ) ; } | Update an upload . |
9,857 | public function inContext ( $ bucket , $ parent = null ) { $ this -> bucket = ( object ) [ 'id' => $ bucket ] ; if ( $ parent ) $ this -> parent = ( object ) [ 'id' => $ parent ] ; } | Method to add the context if not present . |
9,858 | public function index ( $ page = null , $ status = null ) { $ url = 'templates.json' ; $ templates = $ this -> client -> get ( $ url , [ 'query' => [ 'status' => $ status , 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ templates , Template :: class ) ; } | Index all templates . |
9,859 | public function show ( $ id ) { $ template = $ this -> client -> get ( sprintf ( 'templates/%d.json' , $ id ) ) ; return new Template ( $ this -> response ( $ template ) ) ; } | Get a template . |
9,860 | public function store ( $ data ) { $ template = $ this -> client -> post ( 'templates.json' , [ 'json' => $ data , ] ) ; return new Template ( $ this -> response ( $ template ) ) ; } | Store a template . |
9,861 | public function update ( $ id , $ data ) { $ message = $ this -> client -> put ( sprintf ( 'templates/%d.json' , $ id ) , [ 'json' => $ data , ] ) ; return new Template ( $ this -> response ( $ message ) ) ; } | Update a message type . |
9,862 | protected function renderItems ( $ _items = NULL ) { $ _items = is_null ( $ _items ) ? $ this -> items : $ _items ; $ items = '' ; $ dataid = 0 ; foreach ( $ _items as $ item ) { $ options = ArrayHelper :: getValue ( $ item , 'options' , [ 'class' => 'dd-item dd3-item' ] ) ; $ options = ArrayHelper :: merge ( $ this ->... | Render the list items for the sortable widget |
9,863 | protected function prepareItems ( $ activeQuery ) { $ items = [ ] ; foreach ( $ activeQuery -> all ( ) as $ model ) { $ name = ArrayHelper :: getValue ( $ this -> modelOptions , 'name' , 'name' ) ; $ items [ ] = [ 'id' => $ model -> getPrimaryKey ( ) , 'content' => ( is_callable ( $ name ) ? call_user_func ( $ name , $... | put your comment there ... |
9,864 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/recordings/%d/comments.json' , $ this -> bucket , $ this -> parent ) ; $ comments = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ comments , Comment :: class ) ; } | Index all comments . |
9,865 | public function store ( $ content ) { $ comment = $ this -> client -> post ( sprintf ( 'buckets/%d/recordings/%d/comments.json' , $ this -> bucket , $ this -> parent ) , [ 'json' => [ 'content' => $ content , ] , ] ) ; return new Comment ( $ this -> response ( $ comment ) ) ; } | Store a comment . |
9,866 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/webhooks.json' , $ this -> bucket ) ; $ webhooks = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] ] ) ; return $ this -> indexResponse ( $ webhooks , Webhook :: class ) -> map ( function ( $ webhook ) { $ webhook -> inContext... | Index all webhooks . |
9,867 | public function store ( array $ data ) { $ webhook = $ this -> client -> post ( sprintf ( 'buckets/%d/webhooks.json' , $ this -> bucket ) , [ 'json' => $ data , ] ) ; $ webhook = new Webhook ( $ this -> response ( $ webhook ) ) ; $ webhook -> inContext ( $ this -> bucket ) ; return $ webhook ; } | Store a webhook . |
9,868 | public function setResolver ( \ Zend \ View \ Resolver \ ResolverInterface $ oResolver ) { $ this -> resolver = $ oResolver ; return $ this ; } | Set the resolver used to map a template name to a resource the renderer may consume . |
9,869 | public function render ( $ oViewModel , $ aValues = null ) { if ( ! ( $ oViewModel instanceof \ Zend \ View \ Model \ ViewModel ) ) { throw new \ InvalidArgumentException ( sprintf ( 'View Model expects an instance of \Zend\View\Model\ViewModel, "%s" given' , is_object ( $ oViewModel ) ? get_class ( $ oViewModel ) : ge... | Renders js files contents |
9,870 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/questions/%d/answers.json' , $ this -> bucket , $ this -> parent ) ; $ answers = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ answers , QuestionAnswer :: class ) ; } | Index all the question answers . |
9,871 | public function show ( $ bucket , $ id ) { $ answer = $ this -> client -> get ( sprintf ( 'buckets/%d/question_answers/%d.json' , $ this -> bucket , $ id ) ) ; return new QuestionAnswer ( $ this -> response ( $ answer ) ) ; } | Get a question answer . |
9,872 | public function nodeMove ( $ value , $ depth ) { $ this -> node = $ this -> owner ; parent :: moveNode ( $ value , $ depth ) ; } | Wrapper function to be able to use the protected method of the NestedSetsBehavior |
9,873 | protected function getCssFilesContent ( array $ files ) { $ css = '' ; foreach ( $ files as $ file ) { $ css .= $ this -> files -> get ( $ file ) ; } return $ css ; } | Concat all css files . |
9,874 | public function index ( $ page = null , $ status = null ) { $ url = 'projects.json' ; $ projects = $ this -> client -> get ( $ url , [ 'query' => [ 'status' => $ status , 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ projects , Project :: class ) ; } | Index all projects . |
9,875 | public function show ( $ id ) { $ project = $ this -> client -> get ( sprintf ( 'projects/%d.json' , $ id ) ) ; return new Project ( $ this -> response ( $ project ) ) ; } | Show a single project . |
9,876 | public function store ( array $ data ) { $ project = $ this -> client -> post ( 'projects.json' , [ 'json' => $ data , ] ) ; if ( property_exists ( $ project , 'error' ) ) throw new \ Exception ( $ project -> error ) ; return new Project ( $ this -> response ( $ project ) ) ; } | Store a project . |
9,877 | public function index ( $ page = null , $ status = null ) { $ url = sprintf ( 'buckets/%d/todolists/%d/groups.json' , $ this -> bucket , $ this -> parent ) ; $ todolistGroups = $ this -> client -> get ( $ url , [ 'query' => [ 'status' => $ status , 'page' => $ page , ] , ] ) ; return $ this -> indexResponse ( $ todolis... | Index all to - do list groups . |
9,878 | public function show ( $ id ) { $ todolistGroup = $ this -> client -> get ( sprintf ( 'buckets/%d/todolists/%d.json' , $ this -> bucket , $ id ) ) ; return new TodoListGroup ( $ this -> response ( $ todolistGroup ) ) ; } | Get a to - do list group . |
9,879 | public function store ( array $ data ) { $ todolistGroup = $ this -> client -> post ( sprintf ( 'buckets/%d/todolists/%d/groups.json' , $ this -> bucket , $ this -> parent ) , [ 'json' => $ data , ] ) ; return new TodoListGroup ( $ this -> response ( $ todolistGroup ) ) ; } | Store a to - do list group . |
9,880 | public function reposition ( $ id , $ position ) { return $ this -> client -> put ( sprintf ( 'buckets/%d/todolists/groups/%d/position.json' , $ this -> bucket , $ id ) , [ 'json' => [ 'position' => $ position , ] , ] ) ; } | Reposition a to - do list group . |
9,881 | public function generate ( ) { $ methods = array ( ) ; $ rules = array ( ) ; $ messages = array ( ) ; $ php_rules = $ this -> validator -> get_rules ( ) ; foreach ( $ php_rules as $ field_name => $ field_rules ) { $ rules [ $ field_name ] = array ( ) ; foreach ( $ field_rules as $ rule ) { if ( ! ( $ rule instanceof jQ... | Return necessary Client Side Validation representation |
9,882 | public function show ( $ id ) { $ schedule = $ this -> client -> get ( sprintf ( 'buckets/%d/schedules/%d.json' , $ this -> bucket , $ id ) ) ; return new Schedule ( $ this -> response ( $ schedule ) ) ; } | Get a schedule . |
9,883 | public function getRealPath ( $ sPathToResolve , \ AssetsBundle \ AssetFile \ AssetFile $ oAssetFile = null ) { if ( ! is_string ( $ sPathToResolve ) ) { throw new \ InvalidArgumentException ( 'Argument "$sPathToResolve" expects a string, "' . ( is_object ( $ sPathToResolve ) ? get_class ( $ sPathToResolve ) : gettype ... | Try to retrieve realpath for a given path ( manage |
9,884 | protected function safeFileExists ( $ sFilePath ) { if ( ! is_string ( $ sFilePath ) ) { throw new \ InvalidArgumentException ( 'Argument "$sFilePath" expects a string, "' . ( is_object ( $ sFilePath ) ? get_class ( $ sFilePath ) : gettype ( $ sFilePath ) ) . '" given' ) ; } if ( $ this -> openBaseDirPaths === null ) {... | Check if file exists only search in open_basedir path if defined |
9,885 | public function getCacheFileName ( ) { $ aAssets = $ this -> getAssets ( ) ; $ sCacheFileName = isset ( $ aAssets [ $ sModuleName = $ this -> getModuleName ( ) ] ) ? $ sModuleName : \ AssetsBundle \ Service \ ServiceOptions :: NO_MODULE ; $ aUnwantedKeys = array ( \ AssetsBundle \ AssetFile \ AssetFile :: ASSET_CSS => ... | Retrieve cache file name for given module name controller name and action name |
9,886 | public function create ( ) { if ( $ this -> apiObjectName === null ) { throw new LocalException ( 'Missing Object Name in "' . get_class ( $ this ) . '"' ) ; } $ result = $ this -> api -> call ( 'apps.create' , [ $ this -> apiObjectName , $ this -> name , $ this -> p ] ) ; $ this -> setProperties ( $ result ) ; return ... | Create a new Voice App |
9,887 | public function index ( $ page = null ) { $ url = sprintf ( 'buckets/%d/inboxes/%d/forwards.json' , $ this -> bucket , $ this -> parent ) ; $ forwards = $ this -> client -> get ( $ url , [ 'query' => [ 'page' => $ page , ] ] ) ; return $ this -> indexResponse ( $ forwards , Forward :: class ) ; } | Index all forwards . |
9,888 | public function show ( $ id ) { $ forward = $ this -> client -> get ( sprintf ( 'buckets/%d/inbox_forwards/%d.json' , $ this -> bucket , $ id ) ) ; return new Forward ( $ this -> response ( $ forward ) ) ; } | Get a forward . |
9,889 | public function toText ( $ html ) { $ parser = new Parser ( ) ; $ xmlParser = xml_parser_create ( ) ; xml_set_element_handler ( $ xmlParser , [ $ parser , 'startElement' ] , [ $ parser , 'endElement' ] ) ; xml_set_character_data_handler ( $ xmlParser , [ $ parser , 'characterData' ] ) ; $ wrappedHtml = "<root>$html</ro... | Parse the text . |
9,890 | public function export ( ) { $ result = new \ stdClass ; $ class = new \ ReflectionClass ( get_class ( $ this ) ) ; $ plist = $ class -> getProperties ( \ ReflectionProperty :: IS_PUBLIC ) ; foreach ( $ plist as $ property ) { $ result -> { $ property -> getName ( ) } = $ this -> { $ property -> getName ( ) } ; } retur... | Export public properties as an object |
9,891 | public function isAllowed ( $ exception ) { if ( empty ( $ exception ) || ! $ exception instanceof \ Exception ) { return true ; } if ( ! empty ( $ this -> blacklist ) ) { foreach ( $ this -> blacklist as $ excType ) { if ( is_a ( $ exception , $ excType , true ) ) { return false ; } } } return true ; } | Check if the given exception is allowed |
9,892 | public function pushThrottlingStrategy ( ThrottlingStrategyInterface $ throttlingStrategy ) { $ throttlingStrategy -> setStorage ( $ this -> storage ) ; $ this -> throttlingStrategies [ ] = $ throttlingStrategy ; } | Adds the throttling strategy to the internal list of throttling strategies . |
9,893 | public function limit ( $ identifier ) { if ( $ this -> isViolator ( $ identifier ) ) { $ this -> ensureViolationHandler ( ) ; return $ this -> violationHandler -> handleViolation ( ) ; } return true ; } | Requests violation handling from the violation handler if identifier violates any throttling strategy . |
9,894 | public function isViolator ( $ identifier ) { $ violation = false ; foreach ( $ this -> throttlingStrategies as $ throttlingStrategy ) { if ( $ throttlingStrategy -> isViolator ( $ this -> name . ':' . $ identifier ) ) { $ violation = true ; } } return $ violation ; } | Checks whether the entity violates any throttling strategy . |
9,895 | private function getTrace ( ) { $ trace = array ( ) ; if ( PHP_VERSION_ID >= 50400 ) { $ trace = debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS , 10 ) ; } else if ( PHP_VERSION_ID >= 50306 ) { $ trace = debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS ) ; } else { $ trace = debug_backtrace ( ) ; } if ( empty ( $ trace ) ) ... | Get back trace |
9,896 | public function update ( array $ data ) { $ messageType = Basecamp :: messageTypes ( $ this -> bucket -> id ) -> update ( $ this -> id , $ data ) ; $ this -> setAttributes ( $ messageType ) ; return $ messageType ; } | Update the message type . |
9,897 | public function connect ( ) { if ( ! $ this -> getCookie ( ) ) { $ response = $ this -> doRequest ( 'common-info' ) ; $ this -> setCookie ( $ response -> getXmlResponse ( ) -> common -> cookie ) ; } $ this -> connected = true ; } | Establish a connection to AdobeConnect s server |
9,898 | protected function doRequest ( $ action , $ params = array ( ) ) { if ( 'common-info' != $ action && 'login' != $ action ) { $ this -> checkIfIsConnected ( ) ; $ this -> checkIfIsLoggedIn ( ) ; } if ( $ this -> cookie && ! isset ( $ params [ 'session' ] ) ) { $ params [ 'session' ] = $ this -> getCookie ( ) ; } return ... | Call to an action from AdobeConnect s Server |
9,899 | protected function populateEntityFromEvent ( $ eventData , $ entity ) { if ( empty ( $ eventData ) ) { return $ entity ; } if ( isset ( $ eventData [ 'extra' ] ) ) { $ eventData = array_merge ( $ eventData , $ eventData [ 'extra' ] ) ; } foreach ( $ eventData as $ name => $ value ) { if ( $ name === 'priorityName' ) { ... | Transform event into column for the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.