public function newPhoto(PhotoAdapter $photo = null)
    {
        if (empty($photo)) {
            $class = $this->getChildClassNamespace() . '\\Photo';
            $photo = new $class;
        }

        if (! empty($this->plugins)) {
            array_walk($this->plugins, [$photo, 'addPlugin']);
        }

        return $photo;

    }
public function newPhoto(PhotoAdapter $photo = null)
    {
        if (empty($photo)) {
            $class = $this->getChildClassNamespace() . '\\Photo';
            $photo = new $class;
        }

        if (! empty($this->plugins)) {
            array_walk($this->plugins, [$photo, 'addPlugin']);
        }

        return $photo;

    }
public function newPhoto ( PhotoAdapter $ photo = null ) { if ( empty ( $ photo ) ) { $ class = $ this -> getChildClassNamespace ( ) . '\\Photo' ; $ photo = new $ class ; } if ( ! empty ( $ this -> plugins ) ) { array_walk ( $ this -> plugins , [ $ photo , 'addPlugin' ] ) ; } return $ photo ; }
Object builder to create and use the Photo model of a specific service.

@param  \RestGalleries\Interfaces\PhotoAdapter $photo
@return \RestGalleries\Interfaces\PhotoAdapter
Object builder to create and use the Photo model of a specific service .