예제 #1
0
 /**
  * @return ImageResourceInterface[]
  */
 public function getResources()
 {
     $resources = array();
     if ($this->isValid) {
         $tokens = parent::getValue();
         if (is_array($tokens)) {
             foreach ($tokens as $token) {
                 $resources[] = $this->abstractResourceFactory->loadImageResource($token);
             }
         } else {
             $resources[] = $this->abstractResourceFactory->loadImageResource($tokens);
         }
     }
     return $resources;
 }
예제 #2
0
 /**
  * @return ImageResourceInterface[]
  */
 public function getResources()
 {
     $resources = array();
     if ($this->isValid) {
         $value = parent::getValue();
         if (is_array($value)) {
             $values = $value;
         } else {
             $values = array($value);
         }
         foreach ($values as $value) {
             $tokens = $this->scanner->scan($value);
             foreach ($tokens as $token) {
                 $loaded = $this->abstractResourceFactory->loadImageResource($token);
                 if (is_null($loaded)) {
                     continue;
                 }
                 $resources[] = $loaded;
             }
         }
     }
     return $resources;
 }