public function trySet($object) {
      /** if we're passed one argument pluck its object **/
      if (sizeof($object) == 1)
        $object = $object[0];
       if (is_array($object)) {
         /** either its a verb, text or attribute **/
         /** we need to find type by its name **/
              
         /** create the object and any additional attributes **/
         /** attributes are set in "attributes" field of array **/
         $this->handleAttributes($object); 
       } elseif (is_object($object)) {
         
        /** object based initialization **/       
        $this->setVerb($object); 
       } elseif (is_string($object)) {
          /** polymorphic style initialization **/
          /** first parameter needs to be the name of the instance **/
          /** following are attributes **/
        $args = array_slice($object[1], $object[sizeof($object) - 1]);
            
       } else {
          throw new \CatapultApiException("Invalid input for baML must be either string, instance or associative array");
       }
    }
public function trySet($object) {
      /** if we're passed one argument pluck its object **/
      if (sizeof($object) == 1)
        $object = $object[0];
       if (is_array($object)) {
         /** either its a verb, text or attribute **/
         /** we need to find type by its name **/
              
         /** create the object and any additional attributes **/
         /** attributes are set in "attributes" field of array **/
         $this->handleAttributes($object); 
       } elseif (is_object($object)) {
         
        /** object based initialization **/       
        $this->setVerb($object); 
       } elseif (is_string($object)) {
          /** polymorphic style initialization **/
          /** first parameter needs to be the name of the instance **/
          /** following are attributes **/
        $args = array_slice($object[1], $object[sizeof($object) - 1]);
            
       } else {
          throw new \CatapultApiException("Invalid input for baML must be either string, instance or associative array");
       }
    }
public function trySet ( $ object ) { /** if we're passed one argument pluck its object **/ if ( sizeof ( $ object ) == 1 ) $ object = $ object [ 0 ] ; if ( is_array ( $ object ) ) { /** either its a verb, text or attribute **/ /** we need to find type by its name **/ /** create the object and any additional attributes **/ /** attributes are set in "attributes" field of array **/ $ this -> handleAttributes ( $ object ) ; } elseif ( is_object ( $ object ) ) { /** object based initialization **/ $ this -> setVerb ( $ object ) ; } elseif ( is_string ( $ object ) ) { /** polymorphic style initialization **/ /** first parameter needs to be the name of the instance **/ /** following are attributes **/ $ args = array_slice ( $ object [ 1 ] , $ object [ sizeof ( $ object ) - 1 ] ) ; } else { throw new \ CatapultApiException ( "Invalid input for baML must be either string, instance or associative array" ) ; } }
try setting an object
in the namespace
if we cant throw
try setting an object in the namespace if we cant throw