idx int64 0 60.3k | question stringlengths 101 6.21k | target stringlengths 7 803 |
|---|---|---|
14,500 | public function getChartArea ( $ chartIndex ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ chartIndex . '/chartArea' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> ChartArea ; } | Gets ChartArea of a chart . |
14,501 | public function getFillFormat ( $ chartIndex ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ chartIndex . '/chartArea/fillFormat' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> FillFormat ; } | Gets fill format of the ChartArea of a chart . |
14,502 | public function getBorder ( $ chartIndex ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ chartIndex . '/chartArea/border' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Line ; } | Gets border of the ChartArea of a chart . |
14,503 | public function setChartTitle ( $ chartIndex , $ strXML ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; if ( ! isset ( $ chartIndex ) ) throw new Exception ( 'Chart Index not specified' ) ; if ( $ strXML == '' ) throw new Exception ( 'XML data not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ chartIndex . '/title' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'PUT' , 'xml' , $ strXML ) ; $ xml = simplexml_load_string ( $ response ) ; if ( $ xml -> Status == 'OK' ) return true ; else return false ; } | Set Chart Title in Excel Worksheet |
14,504 | public function deleteChartTitle ( $ chartIndex ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; if ( ! isset ( $ chartIndex ) ) throw new Exception ( 'Chart Index not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ chartIndex . '/title' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'DELETE' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Delete Chart Title in Excel Worksheet |
14,505 | public function close ( ) { $ this -> closed = true ; foreach ( $ this -> connections as $ connection ) { $ connection -> close ( ) ; } $ this -> idle = new \ SplQueue ; if ( $ this -> deferred instanceof Deferred ) { $ deferred = $ this -> deferred ; $ this -> deferred = null ; $ deferred -> fail ( new FailureException ( "Connection pool closed" ) ) ; } } | Close all connections in the pool . No further queries may be made after a pool is closed . |
14,506 | private function prepareStatement ( string $ sql ) : \ Generator { $ connection = yield from $ this -> pop ( ) ; \ assert ( $ connection instanceof Link ) ; try { $ statement = yield $ connection -> prepare ( $ sql ) ; \ assert ( $ statement instanceof Statement ) ; } catch ( \ Throwable $ exception ) { $ this -> push ( $ connection ) ; throw $ exception ; } return $ this -> createStatement ( $ statement , function ( ) use ( $ connection ) { $ this -> push ( $ connection ) ; } ) ; } | Prepares a new statement on an available connection . |
14,507 | protected function prepareStates ( Grammar $ grammar ) : void { $ rows = [ ] ; $ states = [ ] ; $ item = Item :: createFromRule ( $ grammar -> getMainRule ( ) ) ; $ item_set = ItemSet :: createFromItems ( [ $ item ] , $ grammar ) ; $ add_states_map = [ 0 => [ '' => $ item_set ] ] ; while ( $ add_states_map ) { $ next_states_map = [ ] ; foreach ( $ add_states_map as $ from_state_index => $ to_states_list ) { foreach ( $ to_states_list as $ from_symbol_name => $ new_state ) { $ from_symbol_term = false ; $ from_symbol_non_term = false ; if ( '' !== $ from_symbol_name ) { $ from_symbol = $ grammar -> getSymbol ( $ from_symbol_name ) ; if ( $ from_symbol -> isTerminal ( ) ) { $ from_symbol_term = true ; } else { $ from_symbol_non_term = true ; } } foreach ( $ states as $ i => $ state ) { if ( $ new_state -> isSame ( $ state ) ) { $ row = $ rows [ $ from_state_index ] ; if ( $ from_symbol_term ) { $ row -> terminalActions [ $ from_symbol_name ] = $ i ; } elseif ( $ from_symbol_non_term ) { $ row -> gotoSwitches [ $ from_symbol_name ] = $ i ; } goto NEXT_NEW_STATE ; } } $ state_index = count ( $ states ) ; $ states [ ] = $ new_state ; $ rows [ ] = new TableRow ( ) ; if ( $ new_state -> hasFinalItem ( ) ) { $ rows [ $ state_index ] -> eofAction = true ; } $ next_states_map [ $ state_index ] = $ new_state -> getNextSets ( $ grammar ) ; $ row = $ rows [ $ from_state_index ] ; if ( $ from_symbol_term ) { $ row -> terminalActions [ $ from_symbol_name ] = $ state_index ; } elseif ( $ from_symbol_non_term ) { $ row -> gotoSwitches [ $ from_symbol_name ] = $ state_index ; } NEXT_NEW_STATE : } } $ add_states_map = $ next_states_map ; } foreach ( $ states as $ index => $ state ) { $ rule = $ state -> getReduceRule ( ) ; if ( $ rule ) { $ rows [ $ index ] -> reduceRule = $ rule ; } } $ this -> rows = $ rows ; $ this -> states = $ states ; } | Fulfill the table according to specified grammar |
14,508 | public function handle ( ProductTypeRepository $ productTypeRepository , Dispatcher $ event ) { $ productType = $ productTypeRepository -> find ( $ this -> id ) ; $ productTypeRepository -> destroy ( $ productType ) ; $ event -> fire ( new ProductTypeWasDestroyed ( $ productType ) ) ; return $ productType ; } | Handles destruction of the product type . |
14,509 | public function checkFlag ( array $ context ) : bool { if ( ! isset ( $ context [ 'user' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The context parameter must contain a "user" key to be able to evaluate the %s flag.' , $ this -> getName ( ) ) ) ; } $ user = $ context [ 'user' ] ; if ( is_string ( $ user ) ) { return false ; } return true ; } | Checks if a user has an account in a given context . |
14,510 | protected function loadCachedRoutes ( ) { $ this -> app [ 'events' ] -> fire ( 'routes.loading' ) ; require $ this -> app -> getCachedRoutesPath ( ) ; $ this -> app [ 'events' ] -> fire ( 'routes.loaded' ) ; } | Load the cached routes for the application . |
14,511 | public function start ( Request $ request , AuthenticationException $ authException = null ) { return new RedirectResponse ( $ this -> cas -> getUri ( ) . $ request -> getUri ( ) ) ; } | Called when authentication is needed but it s not sent . |
14,512 | public function onLogoutSuccess ( Request $ request ) { phpCAS :: setDebug ( $ this -> cas -> getDebug ( ) ) ; phpCAS :: setVerbose ( $ this -> cas -> isVerbose ( ) ) ; if ( ! phpCAS :: isInitialized ( ) ) { phpCAS :: client ( $ this -> cas -> getVersion ( ) , $ this -> cas -> getHostname ( ) , $ this -> cas -> getPort ( ) , $ this -> cas -> getUrl ( ) ) ; } phpCAS :: setLang ( $ this -> cas -> getLanguage ( ) ) ; if ( $ this -> cas -> isRedirectingAfterLogout ( ) ) { $ uri = $ this -> router -> generate ( $ this -> cas -> getRouteLogout ( ) , [ ] , UrlGeneratorInterface :: ABSOLUTE_URL ) ; phpCAS :: logoutWithRedirectService ( $ uri ) ; } else { phpCAS :: logout ( ) ; } } | Logout and redirect to home page . |
14,513 | public function convert ( $ folder = null ) { $ strURI = Product :: $ baseProductUri . '/words/' . $ this -> getFileName ( ) . '?format=' . $ this -> saveFormat ; if ( $ folder ) { $ strURI = $ strURI . "&folder=" . urlencode ( $ folder ) ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { if ( $ this -> saveFormat == 'html' ) { $ save_format = 'zip' ; } else { $ save_format = $ this -> saveFormat ; } $ outputPath = AsposeApp :: $ outPutLocation . Utils :: getFileName ( $ this -> getFileName ( ) ) . '.' . $ save_format ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else { return $ v_output ; } } | Convert a document to SaveFormat using Aspose storage . |
14,514 | public function convertLocalFile ( $ inputPath , $ outputPath , $ outputFormat ) { $ str_uri = Product :: $ baseProductUri . '/words/convert?format=' . $ outputFormat ; $ signed_uri = Utils :: sign ( $ str_uri ) ; $ responseStream = Utils :: uploadFileBinary ( $ signed_uri , $ inputPath , 'xml' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { if ( $ outputFormat == 'html' ) { $ saveFormat = 'zip' ; } else { $ saveFormat = $ outputFormat ; } if ( $ outputPath == '' ) { $ outputPath = AsposeApp :: $ outPutLocation . Utils :: getFileName ( $ inputPath ) . '.' . $ saveFormat ; } Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; } | Convert a document to SaveFormat without using Aspose storage . |
14,515 | public function convertWebPages ( $ strXML ) { if ( $ strXML == '' ) throw new Exception ( 'XML not specified' ) ; $ strURI = Product :: $ baseProductUri . '/words/loadWebDocument' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'XML' , $ strXML ) ; $ xml = simplexml_load_string ( $ responseStream ) ; if ( $ xml -> Status == 'OK' ) { $ fileName = $ xml -> SaveResult -> Dest [ 'href' ] ; $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ fileName ; $ signedURI = Utils :: Sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ fileName ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else { return false ; } } | Convert web pages to Word Documents |
14,516 | public function handle ( ProductRepository $ productRepository , Dispatcher $ event ) { $ product = $ productRepository -> find ( $ this -> id ) -> fill ( array_except ( get_object_vars ( $ this ) , [ 'attributes' ] ) ) ; $ productRepository -> save ( $ product , $ this -> attributes ) ; $ event -> fire ( new ProductWasUpdated ( $ product ) ) ; return $ product ; } | Handles updating of the product . |
14,517 | public function log ( $ level , $ message , array $ context = array ( ) ) { if ( $ this -> outputIsUrgent ( $ level ) || $ this -> isEnabled ( ) ) { $ this -> dispatch ( $ message , $ context ) ; } } | Outputs a log message if necessary . |
14,518 | private function formatFileLine ( $ string ) { $ format = $ this -> getOption ( 'dateFormat' ) . $ this -> getOption ( 'delimiter' ) ; return date ( $ format ) . $ string ; } | Used to format the line outputted in the log file . |
14,519 | private function dispatch ( $ message , $ context ) { $ output = $ this -> interpolate ( $ message , $ context ) . PHP_EOL ; if ( $ this -> getOption ( 'outputToFile' ) === true ) { $ file = $ this -> getOption ( 'logFile' ) ; if ( ! is_writable ( $ file ) ) { throw new AsposeCloudException ( 'The file ' . $ file . ' either does not exist or is not writeable' ) ; } file_put_contents ( $ file , $ this -> formatFileLine ( $ output ) , FILE_APPEND ) ; } else { echo $ output ; } } | Dispatch a log output message . |
14,520 | public static function allKeys ( ) { static $ allKeys = null ; if ( is_null ( $ allKeys ) ) { $ allKeys = array_values ( ( new ReflectionClass ( get_called_class ( ) ) ) -> getConstants ( ) ) ; } return $ allKeys ; } | Get the all possible keys . |
14,521 | public function setLogger ( $ logger ) { if ( ! in_array ( 'Psr\Log\LoggerInterface' , class_implements ( $ logger , true ) ) ) { throw new \ InvalidArgumentException ( 'Logger object does not implement Psr\Log\LoggerInterface' ) ; } $ this -> logger = $ logger ; } | Set the logger for the class to use |
14,522 | public function setInput ( $ input , $ isDecoded = false ) { if ( ! $ isDecoded ) $ input = json_decode ( $ input , true ) ; if ( ! $ input ) { if ( $ this -> logger ) $ this -> logger -> error ( 'Could not decode input' , array ( 'input' => $ input ) ) ; throw new WebHookHandlerException ( 'Could not decode input' , WebHookHandlerException :: INPUT_DECODE_FAILED ) ; } if ( empty ( $ input [ 'payload' ] ) ) { if ( $ this -> logger ) $ this -> logger -> error ( 'No payload in input data' ) ; throw new WebHookHandlerException ( 'No payload in input data' , WebHookHandlerException :: NO_PAYLOAD ) ; } if ( empty ( $ input [ 'payloadEncrypted' ] ) ) $ input [ 'payloadEncrypted' ] = false ; if ( $ input [ 'payloadEncrypted' ] ) { if ( empty ( $ this -> privateKey ) ) { if ( $ this -> logger ) $ this -> logger -> error ( 'No private key supplied for encrypted payload. Please pass the private key in the constructor' ) ; throw new WebHookHandlerException ( 'No private key supplied for encrypted payload. Please pass the private key in the constructor' , WebHookHandlerException :: NO_PRIVATE_KEY ) ; } if ( empty ( $ input [ 'envKey' ] ) ) { if ( $ this -> logger ) $ this -> logger -> error ( 'No envelope key in input payload' ) ; throw new WebHookHandlerException ( 'No envelope key in input payload' , WebHookHandlerException :: NO_ENVELOPE_KEY ) ; } } $ this -> input = $ input ; return $ this ; } | Set the WebHook input |
14,523 | private function getInputFromHTTP ( ) { if ( $ this -> logger ) $ this -> logger -> debug ( 'Getting and decoding HTTP request body' ) ; $ input = file_get_contents ( 'php://input' ) ; $ this -> setInput ( $ input ) ; return $ this -> input ; } | Get the input from the HTTP request body |
14,524 | private function ensureInput ( ) { if ( ! $ this -> input ) { $ this -> getInputFromHTTP ( ) ; if ( ! $ this -> input ) throw new WebHookHandlerException ( 'Could not fetch input' , WebHookHandlerException :: INPUT_FETCH_FAILED ) ; } } | Ensure the input payload exists or throw an exception if not |
14,525 | public function getTimestamp ( $ format = self :: TIMESTAMP_FORMAT_RFC1123 ) { $ this -> ensureInput ( ) ; if ( ! isset ( $ this -> input [ 'timestamp' ] ) ) return null ; switch ( $ format ) { case static :: TIMESTAMP_FORMAT_UNIX : return strtotime ( $ this -> input [ 'timestamp' ] ) ; case static :: TIMESTAMP_FORMAT_RFC1123 : default : return $ this -> input [ 'timestamp' ] ; } } | Get the webhook timestamp |
14,526 | public function getPayload ( ) { if ( $ this -> payload ) return $ this -> payload ; $ this -> ensureInput ( ) ; if ( empty ( $ this -> input [ 'payload' ] ) ) { if ( $ this -> logger ) $ this -> logger -> error ( 'No payload in input data' ) ; throw new WebHookHandlerException ( 'No payload in input data' , WebHookHandlerException :: NO_PAYLOAD ) ; } if ( $ this -> input [ 'payloadEncrypted' ] ) { $ privKey = openssl_pkey_get_private ( $ this -> privateKey , $ this -> passphrase ) ; $ envKey = base64_decode ( $ this -> input [ 'envKey' ] ) ; $ encryptedPayload = base64_decode ( $ this -> input [ 'payload' ] ) ; $ payloadJSON = '' ; if ( openssl_open ( $ encryptedPayload , $ payloadJSON , $ envKey , $ privKey ) ) { if ( $ this -> logger ) $ this -> logger -> debug ( 'Decrypted JSON string' , array ( 'json' => $ payloadJSON ) ) ; $ decrypted = json_decode ( $ payloadJSON , true ) ; if ( $ decrypted ) { $ this -> payload = $ decrypted ; $ this -> payloadJSONString = $ payloadJSON ; } else { if ( $ this -> logger ) $ this -> logger -> error ( 'Invalid decrypted json' ) ; throw new WebHookHandlerException ( 'Invalid decrypted json' , WebHookHandlerException :: INVALID_DECRYPTED_JSON ) ; } } else { if ( $ this -> logger ) $ this -> logger -> error ( 'Could not decrypt payload' , array ( 'error' => openssl_error_string ( ) ) ) ; throw new WebHookHandlerException ( 'Could not decrypt payload' , WebHookHandlerException :: DECRYPTION_FAILED ) ; } openssl_free_key ( $ privKey ) ; } else { $ this -> payload = $ this -> input [ 'payload' ] ; $ this -> payloadJSONString = json_encode ( $ this -> payload ) ; } return $ this -> payload ; } | Get the payload from the WebHook . Returned as associative array |
14,527 | public function verifyHash ( ) { $ this -> ensureInput ( ) ; if ( empty ( $ this -> input [ 'hash' ] ) ) throw new WebHookHandlerException ( 'No hash provided in input payload' , WebHookHandlerException :: NO_INPUT_HASH ) ; if ( $ this -> input [ 'payloadEncrypted' ] ) { if ( ! $ this -> payloadJSONString && ! $ this -> getPayload ( ) ) return false ; } else { if ( ! $ this -> payloadJSONString ) $ this -> payloadJSONString = json_encode ( $ this -> input [ 'payload' ] ) ; } $ webHookSalt = substr ( $ this -> input [ 'hash' ] , 0 , self :: SALT_LENGTH ) ; return $ this -> input [ 'hash' ] === $ webHookSalt . hash ( self :: HASH_METHOD , $ webHookSalt . $ this -> secret . $ this -> payloadJSONString ) ; } | Verify the hash passed with the WebHook against the stored secret passed in the constructor |
14,528 | public function sendExceptionResponse ( WebHookHandlerException $ e ) { $ httpCode = '400 Bad Request' ; switch ( $ e -> getCode ( ) ) { case WebHookHandlerException :: NO_PRIVATE_KEY : $ httpCode = '500 Internal Server Error' ; break ; case WebHookHandlerException :: INVALID_DECRYPTED_JSON : case WebHookHandlerException :: DECRYPTION_FAILED : case WebHookHandlerException :: INPUT_FETCH_FAILED : case WebHookHandlerException :: INPUT_DECODE_FAILED : case WebHookHandlerException :: NO_ENVELOPE_KEY : case WebHookHandlerException :: NO_PAYLOAD : case WebHookHandlerException :: NO_INPUT_HASH : $ httpCode = '400 Bad Request' ; break ; } $ this -> sendHTTPResponse ( $ httpCode , [ 'success' => false , 'errorCode' => $ e -> getCode ( ) , 'errorDescription' => $ e -> getMessage ( ) ] ) ; return $ this ; } | Send a HTTP response for an exception |
14,529 | public function execute ( Observer $ observer ) { $ quote = $ observer -> getQuote ( ) ; $ order = $ observer -> getOrder ( ) ; $ order -> setGabrielqsInstallmentsQty ( $ quote -> getGabrielqsInstallmentsQty ( ) ) -> setGabrielqsInstallmentsInterestRate ( $ quote -> getGabrielqsInstallmentsInterestRate ( ) ) -> setGabrielqsInstallmentsInterestAmount ( $ quote -> getGabrielqsInstallmentsInterestAmount ( ) ) -> setBaseGabrielqsInstallmentsInterestAmount ( $ quote -> getBaseGabrielqsInstallmentsInterestAmount ( ) ) ; } | Copies gabrielqs_installments fields from Quote to Order |
14,530 | public static function createFromItems ( array $ items , Grammar $ grammar ) : self { $ final_items = [ ] ; $ new_items = $ items ; $ known_next_symbols = [ ] ; while ( $ new_items ) { $ next_symbols = [ ] ; foreach ( $ new_items as $ new_item ) { foreach ( $ final_items as $ item ) { if ( 0 === Item :: compare ( $ item , $ new_item ) ) { goto NEXT_NEW_ITEM ; } } $ final_items [ ] = $ new_item ; $ next_symbol = $ new_item -> getExpected ( ) ; if ( ! $ next_symbol || $ next_symbol -> isTerminal ( ) ) { continue ; } $ name = $ next_symbol -> getName ( ) ; if ( isset ( $ known_next_symbols [ $ name ] ) ) { continue ; } $ next_symbols [ $ name ] = $ next_symbol ; NEXT_NEW_ITEM : } $ known_next_symbols += $ next_symbols ; $ new_items = [ ] ; foreach ( $ next_symbols as $ next_symbol ) { $ rules = $ grammar -> getRulesFor ( $ next_symbol ) ; foreach ( $ rules as $ rule ) { $ new_items [ ] = Item :: createFromRule ( $ rule ) ; } } } return new static ( $ final_items , $ items , $ grammar ) ; } | Create a Set from an Items using a grammar |
14,531 | public function getNextSets ( Grammar $ grammar ) : array { $ next_map = [ ] ; foreach ( $ this -> items as $ item ) { $ symbol = $ item -> getExpected ( ) ; if ( ! $ symbol ) { continue ; } $ name = $ symbol -> getName ( ) ; $ next_item = $ item -> shift ( ) ; if ( isset ( $ next_map [ $ name ] ) ) { foreach ( $ next_map [ $ name ] as $ known_item ) { if ( 0 === Item :: compare ( $ next_item , $ known_item ) ) { goto NEXT_ITEM ; } } $ next_map [ $ name ] [ ] = $ next_item ; } else { $ next_map [ $ name ] = [ $ next_item ] ; } NEXT_ITEM : } $ sets = [ ] ; foreach ( $ next_map as $ name => $ items ) { $ sets [ $ name ] = static :: createFromItems ( $ items , $ grammar ) ; } return $ sets ; } | Create list all all next Sets for next states by shifting current position in Items |
14,532 | public function hasItem ( Item $ item , bool $ initialOnly = true ) : bool { $ list = ( $ initialOnly ) ? $ this -> initialItems : $ this -> items ; foreach ( $ list as $ my_item ) { if ( 0 === Item :: compare ( $ my_item , $ item ) ) { return true ; } } return false ; } | Check if this set contains an equal Item |
14,533 | public function hasFinalItem ( ) : bool { foreach ( $ this -> items as $ item ) { if ( $ item -> hasEofMark ( ) && ! $ item -> hasFurther ( ) ) { return true ; } } return false ; } | Check if this set has item where the next token must be EOF |
14,534 | public function getReduceRule ( ) : ? Rule { foreach ( $ this -> items as $ item ) { if ( ! $ item -> hasFurther ( ) ) { return $ item -> getAsRule ( ) ; } } return null ; } | Get reduction rule of this set if any |
14,535 | public function isSame ( ItemSet $ that ) : bool { if ( count ( $ this -> items ) !== count ( $ that -> items ) ) { return false ; } foreach ( $ this -> items as $ i => $ item ) { if ( 0 !== Item :: compare ( $ item , $ that -> items [ $ i ] ) ) { return false ; } } return true ; } | Check equality with another set |
14,536 | private function validateDeterministic ( Grammar $ grammar ) : void { $ finite = [ ] ; $ terminals = [ ] ; $ non_terminals = [ ] ; foreach ( $ this -> items as $ item ) { $ next_symbol = $ item -> getExpected ( ) ; if ( ! $ next_symbol ) { $ finite [ ] = $ item ; } elseif ( $ next_symbol -> isTerminal ( ) ) { $ terminals [ ] = $ item ; } else { $ non_terminals [ ] = $ item ; } } $ this -> validateDeterministicShiftReduce ( $ finite , $ terminals , $ non_terminals , $ grammar ) ; $ this -> validateDeterministicReduceReduce ( $ finite ) ; } | Validate if this set is deterministic |
14,537 | private function validateDeterministicShiftReduce ( array $ finite , array $ terminals , array $ nonTerminals , Grammar $ grammar ) : void { if ( $ finite && $ terminals ) { $ left_terminals = $ grammar -> getTerminals ( ) ; foreach ( $ terminals as $ item ) { unset ( $ left_terminals [ $ item -> getExpected ( ) -> getName ( ) ] ) ; } if ( ! $ left_terminals ) { throw new ConflictShiftReduceException ( array_merge ( $ finite , $ terminals , $ nonTerminals ) ) ; } } } | Check for Shift - Reduce conflicts |
14,538 | public function getCellsList ( $ offset , $ count ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells?offset=' . $ offset . '&count=' . $ count ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; $ listCells = array ( ) ; foreach ( $ json -> Cells -> CellList as $ cell ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells' . $ cell -> link -> Href ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; array_push ( $ listCells , $ json -> Cell ) ; } return $ listCells ; } | Gets a list of cells . |
14,539 | public function getRowsList ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; $ listRows = array ( ) ; foreach ( $ json -> Rows -> RowsList as $ row ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows' . $ row -> link -> Href ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; array_push ( $ listRows , $ json -> Row ) ; } return $ listRows ; } | Gets a list of rows from the worksheet . |
14,540 | public function getColumnsList ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/columns' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; $ listColumns = array ( ) ; foreach ( $ json -> Columns -> ColumnsList as $ column ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/columns' . $ column -> link -> Href ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; array_push ( $ listColumns , $ json -> Column ) ; } return $ listColumns ; } | Gets a list of columns from the worksheet . |
14,541 | public function getMaxColumn ( $ offset , $ count ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells?offset=' . $ offset . '&count=' . $ count ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Cells -> MaxColumn ; } | Gets maximum column index of cell which contains data or style . |
14,542 | public function getAutoShapesCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/autoshapes' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> AutoShapes -> AutoShapeList ) ; } | Gets AutoShape count in the worksheet . |
14,543 | public function getAutoShapeByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/autoshapes/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> AutoShape ; } | Gets a specific AutoShape from the sheet . |
14,544 | public function getChartsCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return Count ( $ json -> Charts -> ChartList ) ; } | Gets charts count in the worksheet . |
14,545 | public function getChartByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/charts/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Chart ; } | Gets a specific chart from the sheet . |
14,546 | public function getHyperlinksCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/hyperlinks' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return Count ( $ json -> Hyperlinks -> HyperlinkList ) ; } | Gets hyperlinks count in the worksheet . |
14,547 | public function getHyperlinkByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/hyperlinks/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Hyperlink ; } | Gets a specific hyperlink from the sheet . |
14,548 | public function deleteHyperlinkByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/hyperlinks/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'DELETE' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Status == 'OK' ) { return true ; } else { return false ; } } | Delete a specific hyperlink from the sheet . |
14,549 | public function addHyperlink ( $ firstRow , $ firstColumn , $ totalRows , $ totalColumns , $ url ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; if ( $ firstRow == '' ) throw new Exception ( 'First Row not specified' ) ; if ( $ firstColumn == '' ) throw new Exception ( 'First Column not specified' ) ; if ( $ totalRows == '' ) throw new Exception ( 'Total Rows not specified' ) ; if ( $ totalColumns == '' ) throw new Exception ( 'Total Columns not specified' ) ; if ( $ url == '' ) throw new Exception ( 'URL not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/hyperlinks?firstRow=' . $ firstRow . '&firstColumn=' . $ firstColumn . '&totalRows=' . $ totalRows . '&totalColumns=' . $ totalColumns . '&address=' . $ url ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'PUT' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Add Hyperlinks to Excel Worksheet |
14,550 | public function updateHyperlink ( $ hyperlinkIndex , $ url , $ screenTip , $ displayText ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; if ( $ hyperlinkIndex == '' ) throw new Exception ( 'Hyperlink Index not specified' ) ; if ( $ url == '' ) throw new Exception ( 'URL not specified' ) ; if ( $ screenTip == '' ) throw new Exception ( 'Screen Tip not specified' ) ; if ( $ displayText == '' ) throw new Exception ( 'Display Text not specified' ) ; $ data = array ( 'address' => $ url , 'ScreenTip' => $ screenTip , 'TextToDisplay' => $ displayText ) ; $ json_data = json_encode ( $ data ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/hyperlinks/' . $ hyperlinkIndex ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ json_data ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Update Hyperlinks to Excel Worksheet |
14,551 | public function getComment ( $ cellName ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/comments/' . $ cellName ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Comment -> HtmlNote ; } | Get comments from cell . |
14,552 | public function getOleObjectByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/oleobjects/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> OleObject ; } | Get OLE object from document . |
14,553 | public function getPictureByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Picture ; } | Get picture from worksheet . |
14,554 | public function getValidationByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/validations/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Validation ; } | Get validation . |
14,555 | public function getMergedCellByIndex ( $ index ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/mergedCells/' . $ index ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> MergedCell ; } | Get merged cells . |
14,556 | public function getMergedCellsCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/mergedCells' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> MergedCells -> Count ; } | Get count of merged cells . |
14,557 | public function getValidationsCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/validations' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> Validations -> ValidationList ) ; } | Get count of validation . |
14,558 | public function getPicturesCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> Pictures -> PictureList ) ; } | Get count of pictures . |
14,559 | public function getOleObjectsCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/oleobjects' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> OleObjects -> OleObjectList ) ; } | Get count of OLE objects . |
14,560 | public function getCommentsCount ( ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/comments' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> Comments -> CommentList ) ; } | Get count of comments . |
14,561 | public function freezePanes ( $ row = 1 , $ col = 1 , $ freezedRows = 1 , $ freezedCols = 1 ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/FreezePanes?row=' . $ row . '&column=' . $ col . '&freezedRows=' . $ freezedRows . '&freezedColumns=' . $ freezedCols ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Freeze panes of a worksheet . |
14,562 | public function updateProperties ( $ properties = array ( ) ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/workbook/worksheets/' . $ this -> worksheetName ; $ signedURI = Utils :: sign ( $ strURI ) ; $ json_data = json_encode ( $ properties ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ json_data ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return $ json -> Worksheet ; else return false ; } | Update document properties . |
14,563 | public function moveWorksheet ( $ worksheetName , $ position ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ fieldsArray [ 'DestinationWorsheet' ] = $ worksheetName ; $ fieldsArray [ 'Position' ] = $ position ; $ jsonData = json_encode ( $ fieldsArray ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/position' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ jsonData ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Change position of the worksheet . |
14,564 | public function calculateFormula ( $ formula ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/formulaResult?formula=' . $ formula ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Value -> Value ; } | Calculate formula . |
14,565 | public function setCellValue ( $ cellName , $ valueType , $ value ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/' . $ cellName . '?value=' . $ value . '&type=' . $ valueType ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Set cell value . |
14,566 | public function getRowsCount ( $ offset , $ count ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows?offset=' . $ offset . '&count=' . $ count ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Rows -> RowsCount ; } | Get count of rows . |
14,567 | public function copyRows ( $ sourceRowIndex = 1 , $ destRowIndex = 1 , $ rowNumber = 1 ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows/copy?sourceRowIndex=' . $ sourceRowIndex . '&destinationRowIndex=' . $ destRowIndex . '&rowNumber=' . $ rowNumber ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Copy rows in a worksheet . |
14,568 | public function getRow ( $ rowIndex ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows/' . $ rowIndex ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Row ; } | Get row from a worksheet . |
14,569 | public function getColumn ( $ columnIndex ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/columns/' . $ columnIndex ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> Column ; } | Get column from a worksheet . |
14,570 | public function sortData ( array $ dataSort , $ cellArea = '' ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/sort?cellArea=' . $ cellArea ; $ json_array = json_encode ( $ dataSort ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ json_array ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Sort data in worksheet . |
14,571 | public function setCellStyle ( $ cellName , array $ style ) { if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/' . $ cellName . '/style' ; $ jsonArray = json_encode ( $ style ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ jsonArray ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Set cell style in worksheet . |
14,572 | public function getCell ( $ cellName ) { if ( $ this -> worksheetName == '' ) { throw new Exception ( 'No Worksheet Specified' ) ; } $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/' . $ cellName ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , 'json' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) { return $ json -> Cell ; } else { return false ; } } | Get cell from a worksheet . |
14,573 | public function addPicture ( $ picturePath , $ pictureLocation , $ upperLeftRow = 0 , $ upperLeftColumn = 0 , $ lowerRightRow = 0 , $ lowerRightColumn = 0 ) { if ( $ this -> worksheetName == '' ) { throw new Exception ( 'No Worksheet Specified' ) ; } if ( $ pictureLocation == 'Server' || $ pictureLocation == 'server' ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures?upperLeftRow=' . $ upperLeftRow . '&upperLeftColumn=' . $ upperLeftColumn . '&lowerRightRow=' . $ lowerRightRow . '&lowerRightColumn=' . $ lowerRightColumn . '&picturePath=' . $ picturePath ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' ) ; } else if ( $ pictureLocation == 'Local' || $ pictureLocation == 'local' ) { if ( ! file_exists ( $ picturePath ) ) { throw new Exception ( 'File Does not Exists' ) ; } $ stream = file_get_contents ( $ picturePath ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures?upperLeftRow=' . $ upperLeftRow . '&upperLeftColumn=' . $ upperLeftColumn . '&lowerRightRow=' . $ lowerRightRow . '&lowerRightColumn=' . $ lowerRightColumn . '&picturePath=' . $ picturePath ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' , '' , $ stream ) ; } $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) { return true ; } else { return false ; } } | Add picture to worksheet . |
14,574 | public function addOleObject ( $ oleFile = '' , $ imageFile = '' , $ upperLeftRow = 0 , $ upperLeftColumn = 0 , $ height = 0 , $ width = 0 ) { if ( $ this -> worksheetName == '' ) { throw new Exception ( 'No Worksheet Specified' ) ; } $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/oleobjects?upperLeftRow=' . $ upperLeftRow . '&upperLeftColumn=' . $ upperLeftColumn . '&height=' . $ height . '&width=' . $ width . '&oleFile=' . $ oleFile . '&imageFile=' . $ imageFile ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) { return true ; } else { return false ; } } | Add OLE object to worksheet . |
14,575 | public function updateOleObject ( $ objectIndex , $ object_data ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/oleobjects/' . $ objectIndex ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ object_data ) ; $ json = json_decode ( $ responseStream ) ; return $ json ; } | Update a specific object from worksheet . |
14,576 | public function updatePicture ( $ pictureIndex , $ picture_data ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures/' . $ pictureIndex ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ picture_data ) ; $ json = json_decode ( $ responseStream ) ; return $ json ; } | Update a specific picture from worksheet . |
14,577 | public function addEmptyRow ( $ rowId ) { if ( $ rowId == '' ) throw new Exception ( 'Row ID not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/rows/' . $ rowId ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'PUT' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return $ json -> Row ; else return false ; } | Add an Empty Row in a Worksheet |
14,578 | public function setFormula ( $ cellName , $ formula ) { if ( $ cellName == '' ) throw new Exception ( 'Cell Name not specified' ) ; if ( $ formula == '' ) throw new Exception ( 'Formula not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/' . $ cellName . '?formula=' . $ formula ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return $ json -> Cell ; else return false ; } | Set Formula for a Cell in Excel Worksheets |
14,579 | public function clearCellsContents ( $ range ) { if ( $ range == '' ) throw new Exception ( 'Range not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/clearcontents?range=' . $ range ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) return true ; else return false ; } | Clear Contents and Styles of Cells in Excel Worksheet |
14,580 | public function mergeCells ( $ startRow , $ startColumn , $ totalRows , $ totalColumns ) { if ( $ startRow == '' ) throw new Exception ( 'Start Row not specified' ) ; if ( $ startColumn == '' ) throw new Exception ( 'Start Column not specified' ) ; if ( $ totalRows == '' ) throw new Exception ( 'Total Rows not specified' ) ; if ( $ totalColumns == '' ) throw new Exception ( 'Total Columns not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/merge?startrow=' . $ startRow . '&startcolumn=' . $ startColumn . '&totalrows=' . $ totalRows . '&totalcolumns=' . $ totalColumns ; $ signedURI = Utils :: sign ( $ strURI ) ; $ response = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ response ) ; if ( $ json -> Code == 200 ) { $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ this -> getFileName ( ) ; $ signedURI = Utils :: Sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ this -> getFileName ( ) ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else return false ; } | Merge Cells in Excel Worksheet |
14,581 | public function setRangeValue ( $ cellarea , $ value , $ type ) { if ( $ cellarea == '' ) throw new Exception ( 'Cellarea not specified' ) ; if ( $ value == '' ) throw new Exception ( 'Value not specified' ) ; if ( $ type == '' ) throw new Exception ( 'Type not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells?cellarea=' . $ cellarea . '&value=' . $ value . '&type=' . $ type ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output == '' ) { $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ this -> getFileName ( ) ; $ signedURI = Utils :: Sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ this -> getFileName ( ) ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; } | Set Range Value in Excel Worksheet |
14,582 | public function clearCellsFormatting ( $ startRow , $ startColumn , $ endRow , $ endColumn ) { if ( $ startRow == '' ) throw new Exception ( 'Start Row not specified' ) ; if ( $ startColumn == '' ) throw new Exception ( 'Start Column not specified' ) ; if ( $ endRow == '' ) throw new Exception ( 'End Row not specified' ) ; if ( $ endColumn == '' ) throw new Exception ( 'End Column not specified' ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/cells/ClearFormats?startRow=' . $ startRow . '&startColumn=' . $ startColumn . '&endRow=' . $ endRow . '&endColumn=' . $ endColumn ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output == '' ) { $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ this -> getFileName ( ) ; $ signedURI = Utils :: Sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ this -> getFileName ( ) ; Utils :: saveFile ( $ responseStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; } | Clear Cells Formatting in Excel Worksheet |
14,583 | public function isReduceOnly ( ) : bool { return ! $ this -> eofAction && ! $ this -> terminalActions && ! $ this -> gotoSwitches && $ this -> reduceRule ; } | Whether the row is for reduce |
14,584 | private function getLocation ( ) { return new Location ( $ this -> event -> get ( 'Location_X' ) , $ this -> event -> get ( 'Location_Y' ) , $ this -> event ) ; } | Create a location object from an incoming message . |
14,585 | public function getText ( ) { $ parameters = func_get_args ( ) ; if ( count ( $ parameters ) > 0 ) { $ pageNumber = $ parameters [ 0 ] ; } $ strURI = Product :: $ baseProductUri . '/pdf/' . $ this -> getFileName ( ) . ( ( isset ( $ parameters [ 0 ] ) ) ? '/pages/' . $ pageNumber . '/TextItems' : '/TextItems' ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; $ rawText = '' ; foreach ( $ json -> TextItems -> List as $ textItem ) { $ rawText .= $ textItem -> Text ; } return $ rawText ; } | Gets raw text from the whole PDF file or a specific page . |
14,586 | public function getTextItems ( ) { $ parameters = func_get_args ( ) ; if ( count ( $ parameters ) == 1 ) { $ pageNumber = $ parameters [ 0 ] ; } else if ( count ( $ parameters ) == 2 ) { $ pageNumber = $ parameters [ 0 ] ; $ fragmentNumber = $ parameters [ 1 ] ; } $ strURI = Product :: $ baseProductUri . '/pdf/' . $ this -> getFileName ( ) ; if ( isset ( $ parameters [ 0 ] ) ) { $ strURI .= '/pages/' . $ pageNumber ; if ( isset ( $ parameters [ 1 ] ) ) { $ strURI .= '/fragments/' . $ fragmentNumber ; } } $ strURI .= '/TextItems' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> TextItems -> List ; } | Gets text items from the whole PDF file or a specific page . |
14,587 | public function getPagesWordCount ( ) { try { $ strURI = Product :: $ baseProductUri . "/pdf/" . $ this -> getFileName ( ) . "/pages/wordCount" ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> WordsPerPage -> List ; } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; } } | Gets count of the fragments from all pages |
14,588 | public function getSegmentCount ( $ pageNumber = '' , $ fragmentNumber = '' ) { if ( $ pageNumber == '' ) throw new Exception ( 'page number not specified' ) ; if ( $ fragmentNumber == '' ) throw new Exception ( 'fragment number not specified' ) ; $ strURI = Product :: $ baseProductUri . '/pdf/' . $ this -> getFileName ( ) . '/pages/' . $ pageNumber . '/fragments/' . $ fragmentNumber ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> TextItems -> List ) ; } | Gets count of the segments in a fragment . |
14,589 | public function getTextFormat ( ) { $ args = func_get_args ( ) ; if ( count ( $ args ) == 2 ) { $ pageNumber = $ args [ 0 ] ; $ fragmentNumber = $ args [ 1 ] ; } if ( count ( $ args ) == 3 ) { $ pageNumber = $ args [ 0 ] ; $ fragmentNumber = $ args [ 1 ] ; $ segamentNumber = $ args [ 2 ] ; } $ strURI = Product :: $ baseProductUri . '/pdf/' . $ this -> getFileName ( ) . '/pages/' . $ pageNumber . '/fragments/' . $ fragmentNumber ; if ( isset ( $ segamentNumber ) ) { $ strURI .= '/segments/' . '/textformat' ; } else { $ strURI .= '/textformat' ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> TextFormat ; } | Gets TextFormat of a particular Fragment . |
14,590 | public function getMessageDefaults ( $ key = null ) { if ( is_null ( $ key ) ) { return $ this -> messageDefaults ; } if ( isset ( $ this -> messageDefaults [ $ key ] ) ) { return $ this -> messageDefaults [ $ key ] ; } } | Retrieve message defaults . |
14,591 | public function sendMessage ( $ message ) { if ( $ payload = $ this -> getJsonPayload ( $ message ) ) { $ response = $ this -> getHttpClient ( ) -> post ( $ this -> getWebhook ( ) , [ 'headers' => [ 'Content-Type' => 'application/json' ] , 'body' => $ payload , ] ) ; return 200 === $ response -> getStatusCode ( ) ; } return false ; } | Send message to the BearyChat . |
14,592 | protected function getJsonPayload ( $ message ) { if ( is_array ( $ message ) || $ message instanceof JsonSerializable ) { return json_encode ( $ message ) ; } elseif ( method_exists ( $ message , 'toJson' ) ) { return $ message -> toJson ( ) ; } elseif ( method_exists ( $ message , 'toArray' ) ) { return json_encode ( $ message -> toArray ( ) ) ; } elseif ( is_string ( $ message ) && is_array ( json_decode ( $ message , true ) ) ) { return $ message ; } } | Get the JSON payload from an object . |
14,593 | public function changeSlidePosition ( $ old_position = '' , $ new_position = '' , $ storageName = '' , $ folder = '' ) { if ( $ old_position == '' || $ new_position == '' ) throw new Exception ( 'Missing Required Params' ) ; $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '/slides?OldPosition=' . $ old_position . '&NewPosition=' . $ new_position ; if ( $ folder != '' ) { $ strURI .= 'folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return $ json -> Slides ; else return false ; } | Change slide position . |
14,594 | public function cloneSlide ( $ slideno = '' , $ position = '' , $ storageName = '' , $ folder = '' ) { if ( $ position == '' ) throw new Exception ( 'Position not speciefied.' ) ; if ( $ slideno == '' ) throw new Exception ( 'Slide not speciefied.' ) ; $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '/slides?SlideToClone=' . $ slideno . '&Position=' . $ position ; if ( $ folder != '' ) { $ strURI .= 'folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return $ json -> Slides ; else return false ; } | Clone slide in a presentation . |
14,595 | public function splitPresentation ( $ from = '' , $ to = '' , $ destination = '' , $ format = '' , $ storageName = '' , $ folder = '' ) { $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '/split?' ; if ( $ folder != '' ) { $ strURI .= '&folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } if ( $ from != '' ) { $ strURI .= '&from=' . $ from ; } if ( $ to != '' ) { $ strURI .= '&to=' . $ to ; } if ( $ destination != '' ) { $ strURI .= '&destFolder=' . $ destination ; } if ( $ format != '' ) { $ strURI .= '&format=' . $ format ; } $ strURI = rtrim ( $ strURI , '?' ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) { foreach ( $ json -> SplitResult -> Slides as $ splitPage ) { $ splitFileName = basename ( $ splitPage -> Href ) ; $ strURI = Product :: $ baseProductUri . '/storage/file/' . $ splitFileName ; $ signedURI = Utils :: Sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , "GET" , "" , "" ) ; $ outputFile = AsposeApp :: $ outPutLocation . $ splitFileName ; Utils :: saveFile ( $ responseStream , $ outputFile ) ; } } else return false ; } | Split presentation . |
14,596 | public function mergePresentations ( $ presentationsList = array ( ) , $ storageName = '' , $ folder = '' ) { if ( ! is_array ( $ presentationsList ) || empty ( $ presentationsList ) ) throw new Exception ( 'Presentation list not speciefied' ) ; $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '/merge' ; if ( $ folder != '' ) { $ strURI .= '?folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ json_data = json_encode ( $ presentationsList ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' , 'json' , $ json_data ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return $ json -> Document ; else return false ; } | Merge multiple presentations into single presentation . |
14,597 | public function createEmptyPresentation ( $ storageName = '' , $ folder = '' ) { $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) ; if ( $ folder != '' ) { $ strURI .= '?folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 201 ) return $ json -> Document ; else return false ; } | Create empty presenation and store it on Aspose cloud storage . |
14,598 | public function getSlideCount ( $ storageName = '' , $ folder = '' ) { $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . '/slides' ; if ( $ folder != '' ) { $ strURI .= '?folder=' . $ folder ; } if ( $ storageName != '' ) { $ strURI .= '&storage=' . $ storageName ; } $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> Slides -> SlideList ) ; } | Finds the slide count of the specified PowerPoint document . |
14,599 | public function getAllTextItems ( ) { $ parameters = func_get_args ( ) ; if ( count ( $ parameters ) == 2 ) { $ slideNumber = $ parameters [ 0 ] ; $ withEmpty = $ parameters [ 1 ] ; } $ strURI = Product :: $ baseProductUri . '/slides/' . $ this -> getFileName ( ) . ( ( isset ( $ parameters [ 0 ] ) ) ? '/slides/' . $ slideNumber . '/textItems?withEmpty=' . $ withEmpty : '/textItems' ) ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return $ json -> TextItems -> Items ; } | Gets all the text items in a slide or presentation . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.